diff --git a/test/README.md b/test/README.md index 4312e6fcf37e61..94f77eda5148f2 100644 --- a/test/README.md +++ b/test/README.md @@ -373,7 +373,7 @@ Synchronous version of `spawnPwd`. ### tmpDir * return [<String>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) -Path to the 'tmp' directory. +The realpath of the 'tmp' directory. ### tmpDirName * return [<String>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) diff --git a/test/common.js b/test/common.js index 933ef45821b4f8..05ef4c9d682c0d 100644 --- a/test/common.js +++ b/test/common.js @@ -11,7 +11,7 @@ const Timer = process.binding('timer_wrap').Timer; const execSync = require('child_process').execSync; const testRoot = process.env.NODE_TEST_DIR ? - path.resolve(process.env.NODE_TEST_DIR) : __dirname; + fs.realpathSync(process.env.NODE_TEST_DIR) : __dirname; exports.fixturesDir = path.join(__dirname, 'fixtures'); exports.tmpDirName = 'tmp';