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 1, 2015
1 parent b4ad5d7 commit 2b2eca2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/parallel/test-net-listen-anyaddr.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
var assert = require('assert');
var cp = require('child_process');

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

// should exit cleanly almost immediately
cp.execFile(process.execPath, args, {timeout: 500}, assert.ifError);

0 comments on commit 2b2eca2

Please sign in to comment.