Skip to content

Commit 55a4ec8

Browse files
committed
socket: check error.message string .toMatch()
1 parent 6ef464e commit 55a4ec8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/socket/src/socketwrapper.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ const enabled = !!globalThis.process?.env.SOCKETSERVER_ENABLED;
344344
done.fail("must not resolve");
345345
})
346346
.catch((error) => {
347-
expect(error).toMatch(/socket was closed/i);
347+
expect(error.message).toMatch(/socket was closed/i);
348348
done();
349349
});
350350
},

0 commit comments

Comments
 (0)