Skip to content
Closed
Show file tree
Hide file tree
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
5 changes: 0 additions & 5 deletions test/common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -376,11 +376,6 @@ Synchronous version of `spawnPwd`.

The realpath of the 'tmp' directory.

### tmpDirName
* return [<String>]

Name of the temp directory used by tests.

## Countdown Module

The `Countdown` module provides a simple countdown mechanism for tests that
Expand Down
6 changes: 3 additions & 3 deletions test/common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ exports.fixturesDir = fixturesDir;

// Using a `.` prefixed name, which is the convention for "hidden" on POSIX,
// gets tools to ignore it by default or by simple rules, especially eslint.
exports.tmpDirName = '.tmp';
let tmpDirName = '.tmp';
// PORT should match the definition in test/testpy/__init__.py.
exports.PORT = +process.env.NODE_COMMON_PORT || 12346;
exports.isWindows = process.platform === 'win32';
Expand Down Expand Up @@ -165,9 +165,9 @@ exports.refreshTmpDir = function() {

if (process.env.TEST_THREAD_ID) {
exports.PORT += process.env.TEST_THREAD_ID * 100;
exports.tmpDirName += `.${process.env.TEST_THREAD_ID}`;
tmpDirName += `.${process.env.TEST_THREAD_ID}`;
}
exports.tmpDir = path.join(testRoot, exports.tmpDirName);
exports.tmpDir = path.join(testRoot, tmpDirName);

let opensslCli = null;
let inFreeBSDJail = null;
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-fs-realpath.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ function test_simple_relative_symlink(realpath, realpathSync, callback) {
const entry = `${tmpDir}/symlink`;
const expected = `${tmpDir}/cycles/root.js`;
[
[entry, `../${common.tmpDirName}/cycles/root.js`]
[entry, `../${path.basename(tmpDir)}/cycles/root.js`]
].forEach(function(t) {
try { fs.unlinkSync(t[0]); } catch (e) {}
console.log('fs.symlinkSync(%j, %j, %j)', t[1], t[0], 'file');
Expand Down