mirror of
https://github.com/nodejs/node.git
synced 2025-04-28 21:46:48 +00:00

Move tmpdir functionality to its own module (common/tmpdir). PR-URL: https://github.com/nodejs/node/pull/17856 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
14 lines
364 B
JavaScript
14 lines
364 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
const net = require('net');
|
|
const server = net.createServer(common.mustNotCall());
|
|
|
|
const tmpdir = require('../common/tmpdir');
|
|
tmpdir.refresh();
|
|
|
|
server.listen(common.PIPE, common.mustCall(function() {
|
|
assert.strictEqual(server.address(), common.PIPE);
|
|
server.close();
|
|
}));
|