Skip to content

Commit 84c0e18

Browse files
committed
update test
1 parent 73e0812 commit 84c0e18

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/core/src/test/shared/sam/build.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,9 @@ describe('SAM runBuild', () => {
515515
}
516516
})
517517

518-
it('should throw ToolkitError when sync command fail', async () => {
518+
it('should throw ToolkitError when build command fail', async () => {
519+
getTestWindow().onDidShowMessage((m) => m.items.find((i) => i.title === 'View Logs In Terminal')?.select())
520+
519521
const prompterTester = PrompterTester.init()
520522
.handleQuickPick('Specify parameter source for build', async (quickPick) => {
521523
await quickPick.untilReady()
@@ -544,6 +546,8 @@ describe('SAM runBuild', () => {
544546
} catch (error: any) {
545547
assert(error instanceof ToolkitError)
546548
assert.strictEqual(error.message, 'Failed to build SAM template')
549+
assert(error.details?.['terminal'] as unknown as vscode.Terminal)
550+
assert.strictEqual((error.details?.['terminal'] as unknown as vscode.Terminal).name, 'SAM build')
547551
}
548552
prompterTester.assertCallAll()
549553
})

0 commit comments

Comments
 (0)