node/test/parallel/test-net-connect-paused-connection.js
cjihrig ff1efa6087 test: use const for all require() calls
PR-URL: https://github.com/nodejs/node/pull/10550
Reviewed-By: Rich Trott <rtrott@gmail.com>
2017-01-02 18:28:18 -05:00

15 lines
310 B
JavaScript

'use strict';
const common = require('../common');
const net = require('net');
net.createServer(function(conn) {
conn.unref();
}).listen(0, function() {
net.connect(this.address().port, 'localhost').pause();
setTimeout(function() {
common.fail('expected to exit');
}, 1000).unref();
}).unref();