1
- if ( process . env . INCLUDE_COMPAT_TESTS ) {
2
- const zmq = require ( "./load" )
3
- const semver = require ( "semver" )
4
- const { assert} = require ( "chai" )
5
- const { testProtos, uniqAddress} = require ( "../helpers" )
6
- const { isFullError} = require ( "../../src/errors" )
1
+ import * as zmq from "../../../v5-compat"
2
+ import semver from "semver"
3
+ import { assert } from "chai"
4
+ import { testProtos , uniqAddress } from "../helpers"
5
+ import { isFullError } from "../../../src/errors"
7
6
7
+ if ( process . env . INCLUDE_COMPAT_TESTS ) {
8
8
/* This test case only seems to work reliably with TCP. */
9
9
for ( const proto of testProtos ( "tcp" ) ) {
10
10
describe ( `compat socket with ${ proto } monitor` , function ( ) {
@@ -24,11 +24,11 @@ if (process.env.INCLUDE_COMPAT_TESTS) {
24
24
}
25
25
} )
26
26
27
- it ( "should be able to monitor the socket" , function ( done ) {
27
+ it ( "should be able to monitor the socket" , async function ( done ) {
28
28
const rep = zmq . socket ( "rep" )
29
29
const req = zmq . socket ( "req" )
30
30
31
- const address = uniqAddress ( proto )
31
+ const address = await uniqAddress ( proto )
32
32
33
33
rep . on ( "message" , function ( msg ) {
34
34
assert . instanceOf ( msg , Buffer )
0 commit comments