Skip to content

Commit 8f29a09

Browse files
author
Keegan Irby
committed
Assert error thrown is as expected
1 parent f26628b commit 8f29a09

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/core/src/test/awsService/cloudWatchLogs/commands/tailLogGroup.test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ describe('TailLogGroup', function () {
5656
getSessionUpdateFrame(false, `${testMessage}-2`, startTimestamp + 2000),
5757
getSessionUpdateFrame(false, `${testMessage}-3`, startTimestamp + 3000),
5858
]
59-
// Returns the configured update frames and then blocks until an AbortCcontroller is signaled.
59+
// Returns the configured update frames and then blocks until an AbortController is signaled.
6060
// This keeps the stream 'open', simulating an open network stream waiting for new events.
6161
// If the stream were to close, the event listeners in the TailLogGroup command would dispose,
6262
// breaking the 'closes tab closes session' assertions this test makes.
@@ -95,7 +95,10 @@ describe('TailLogGroup', function () {
9595
void tailLogGroup(registry, testSource, codeLensProvider, {
9696
groupName: testLogGroup,
9797
regionName: testRegion,
98-
}).catch((e) => {})
98+
}).catch((e) => {
99+
const err = e as Error
100+
assert.strictEqual(err.message.startsWith('Unexpected on-stream exception while tailing session:'), true)
101+
})
99102
await waitUntil(async () => registry.size !== 0, { interval: 100, timeout: 1000 })
100103

101104
// registry is asserted to have only one entry, so this is assumed to be the session that was

0 commit comments

Comments
 (0)