test: allow tmpDir.path
to be modified
PR-URL: https://github.com/nodejs/node/pull/58173 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
292263e378
commit
563be01292
@ -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) {
|
||||
@ -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…
x
Reference in New Issue
Block a user