Skip to content

Commit 5c2f5d2

Browse files
authored
Merge pull request #7 from igorls/copilot/sub-pr-6
Restore proper Jest assertion in event dispatch error handling test
2 parents 7f328b4 + 6ae97f7 commit 5c2f5d2

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

test/connection-state.spec.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -235,11 +235,7 @@ describe("Connection State and Reconnection", () => {
235235
const event = new CustomEvent("reconnection_failed", { detail: null });
236236

237237
// Should not throw
238-
try {
239-
api.dispatchEvent(event);
240-
} catch (e) {
241-
// ignore
242-
}
238+
expect(() => api.dispatchEvent(event)).not.toThrow();
243239

244240
// Wait for async callback
245241
await new Promise((resolve) => setTimeout(resolve, 10));

0 commit comments

Comments
 (0)