8000 test: add common.mustCall test-dgram-listen-after-bind · nodejs/node@c4d67f2 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit c4d67f2

Browse files
zhoujiamintargos
zhoujiamin
authored andcommitted
test: add common.mustCall test-dgram-listen-after-bind
PR-URL: #27454 Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Yorkie Liu <yorkiefixer@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
1 parent 23fb430 commit c4d67f2

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

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

+5-4
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)
0