Skip to content

Commit

Permalink
test: eval mode net.listen should emit listening
Browse files Browse the repository at this point in the history
Server does not emit a listen event when no address is specified and
is called in eval mode.

Regression introduced in 5b636fe.
  • Loading branch information
rmg committed May 15, 2015
1 parent 8a0e529 commit ed74eaa
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/parallel/test-net-listen-anyaddr.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
var assert = require('assert');
var common = require('../common');
var cp = require('child_process');

var args = [
'-e',
"require('net').createServer().listen(0, function() { this.close(); });",
];

// should exit cleanly almost immediately
var opts = {
timeout: common.platformTimeout(1000),
};

cp.execFile(process.execPath, args, opts, assert.ifError);

0 comments on commit ed74eaa

Please sign in to comment.