summaryrefslogtreecommitdiff
path: root/tests/unit/websocket_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/websocket_test.ts')
-rw-r--r--tests/unit/websocket_test.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/unit/websocket_test.ts b/tests/unit/websocket_test.ts
index 7db876b17..3aafe8da2 100644
--- a/tests/unit/websocket_test.ts
+++ b/tests/unit/websocket_test.ts
@@ -453,7 +453,8 @@ Deno.test("invalid server", async () => {
const { promise, resolve } = Promise.withResolvers<void>();
const ws = new WebSocket("ws://localhost:2121");
let err = false;
- ws.onerror = () => {
+ ws.onerror = (e) => {
+ assert("error" in e);
err = true;
};
ws.onclose = () => {