test: move tmpdir to submodule of common

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>
This commit is contained in:
Rich Trott 2017-12-24 22:38:11 -08:00
parent 6035beea93
commit bf6ce47259
154 changed files with 643 additions and 454 deletions

View file

@ -12,7 +12,8 @@ class Agent extends http.Agent {
}
}
common.refreshTmpDir();
const tmpdir = require('../common/tmpdir');
tmpdir.refresh();
server.listen(common.PIPE, common.mustCall(() => {
const req = http.get({