Skip to content

Commit ed74eaa

Browse files
committed
test: eval mode net.listen should emit listening
Server does not emit a listen event when no address is specified and is called in eval mode. Regression introduced in 5b636fe.
1 parent 8a0e529 commit ed74eaa

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
var assert = require('assert');
2+
var common = require('../common');
3+
var cp = require('child_process');
4+
5+
var args = [
6+
'-e',
7+
"require('net').createServer().listen(0, function() { this.close(); });",
8+
];
9+
10+
// should exit cleanly almost immediately
11+
var opts = {
12+
timeout: common.platformTimeout(1000),
13+
};
14+
15+
cp.execFile(process.execPath, args, opts, assert.ifError);

0 commit comments

Comments
 (0)