Skip to content

Commit f848701

Browse files
author
zhoujiamin
committed
test: add common.mustCall test-dgram-listen-after-bind
1 parent 8594211 commit f848701

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/parallel/test-dgram-listen-after-bind.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
'use strict';
2323
require('../common');
24+
const common = require('../common');
2425
const assert = require('assert');
2526
const dgram = require('dgram');
2627

@@ -33,12 +34,12 @@ const timer = setTimeout(() => {
3334
socket.close();
3435
}, 100);
3536

36-
socket.on('listening', () => {
37+
socket.on('listening', common.mustCall(() => {
3738
clearTimeout(timer);
3839
fired = true;
3940
socket.close();
40-
});
41+
}));
4142

42-
socket.on('close', () => {
43+
socket.on('close', common.mustCall(() => {
4344
assert(fired, 'listening should fire after bind');
44-
});
45+
}));

0 commit comments

Comments
 (0)