Skip to content

Commit fe042d7

Browse files
committed
test: fix socket error callback compat test
1 parent 125e5ce commit fe042d7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

test/unit/compat/socket-error-callback-test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import * as zmq from "../../../v5-compat"
22
import type {Socket} from "../../../v5-compat"
33
import {isFullError} from "../../../src/errors"
4+
import {assert} from "chai"
45

56
if (process.env.INCLUDE_COMPAT_TESTS) {
67
describe("compat socket error callback", function () {
@@ -21,9 +22,7 @@ if (process.env.INCLUDE_COMPAT_TESTS) {
2122

2223
it("should callback with error when not connected", function (done) {
2324
sock.send(["foo", "bar"], null, err => {
24-
if (!isFullError(err)) {
25-
throw err
26-
}
25+
assert.isUndefined(err)
2726
sock.close()
2827
done()
2928
})

0 commit comments

Comments
 (0)