Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f89efbc

Browse filesBrowse files
Trottgibfahn
authored andcommitted
test: remove common.tmpDirName
`common.tmpDirName` is used in only one test and can be replaced with `path.basename(common.tmpDir)`. PR-URL: #17266 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
1 parent a20b774 commit f89efbc
Copy full SHA for f89efbc

File tree

Expand file treeCollapse file tree

3 files changed

+4
-9
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+4
-9
lines changed
Open diff view settings
Collapse file

‎test/common/README.md‎

Copy file name to clipboardExpand all lines: test/common/README.md
-5Lines changed: 0 additions & 5 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -375,11 +375,6 @@ Synchronous version of `spawnPwd`.
375375

376376
The realpath of the 'tmp' directory.
377377

378-
### tmpDirName
379-
* return [&lt;String>]
380-
381-
Name of the temp directory used by tests.
382-
383378
## Countdown Module
384379

385380
The `Countdown` module provides a simple countdown mechanism for tests that
Collapse file

‎test/common/index.js‎

Copy file name to clipboardExpand all lines: test/common/index.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ exports.fixturesDir = fixturesDir;
4040

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

177177
if (process.env.TEST_THREAD_ID) {
178178
exports.PORT += process.env.TEST_THREAD_ID * 100;
179-
exports.tmpDirName += `.${process.env.TEST_THREAD_ID}`;
179+
tmpDirName += `.${process.env.TEST_THREAD_ID}`;
180180
}
181-
exports.tmpDir = path.join(testRoot, exports.tmpDirName);
181+
exports.tmpDir = path.join(testRoot, tmpDirName);
182182

183183
let opensslCli = null;
184184
let inFreeBSDJail = null;
Collapse file

‎test/parallel/test-fs-realpath.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-fs-realpath.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ function test_simple_relative_symlink(callback) {
111111
const entry = `${tmpDir}/symlink`;
112112
const expected = `${tmpDir}/cycles/root.js`;
113113
[
114-
[entry, `../${common.tmpDirName}/cycles/root.js`]
114+
[entry, `../${path.basename(tmpDir)}/cycles/root.js`]
115115
].forEach(function(t) {
116116
try { fs.unlinkSync(t[0]); } catch (e) {}
117117
console.log('fs.symlinkSync(%j, %j, %j)', t[1], t[0], 'file');

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.