mirror of
https://github.com/nodejs/node.git
synced 2025-05-18 11:29:35 +00:00

common.PIPE resides in the temp directory (except on Windows). Insure that the temp directory is refreshed in tests that use common.PIPE. PR-URL: https://github.com/nodejs/node/pull/3231 Fixes: https://github.com/nodejs/node/issues/3227 Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
22 lines
410 B
JavaScript
22 lines
410 B
JavaScript
'use strict';
|
|
var common = require('../common');
|
|
var assert = require('assert');
|
|
var net = require('net');
|
|
|
|
var address = null;
|
|
|
|
var server = net.createServer(function() {
|
|
assert(false); // should not be called
|
|
});
|
|
|
|
common.refreshTmpDir();
|
|
|
|
server.listen(common.PIPE, function() {
|
|
address = server.address();
|
|
server.close();
|
|
});
|
|
|
|
process.on('exit', function() {
|
|
assert.equal(address, common.PIPE);
|
|
});
|