Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions test/common/tmpdir.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const testRoot = process.env.NODE_TEST_DIR ?
// gets tools to ignore it by default or by simple rules, especially eslint.
const tmpdirName = '.tmp.' +
(process.env.TEST_SERIAL_ID || process.env.TEST_THREAD_ID || '0');
const tmpPath = path.join(testRoot, tmpdirName);
let tmpPath = path.join(testRoot, tmpdirName);

let firstRefresh = true;
function refresh(useSpawn = false) {
Expand Down Expand Up @@ -100,7 +100,13 @@ function fileURL(...paths) {
module.exports = {
fileURL,
hasEnoughSpace,
path: tmpPath,
refresh,
resolve,

get path() {
return tmpPath;
},
set path(newPath) {
tmpPath = path.resolve(newPath);
},
};
Loading