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 f1b26be

Browse filesBrowse files
TrottMylesBorins
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 cc91a00 commit f1b26be
Copy full SHA for f1b26be

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
@@ -376,11 +376,6 @@ Synchronous version of `spawnPwd`.
376376

377377
The realpath of the 'tmp' directory.
378378

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

386381
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';
@@ -165,9 +165,9 @@ exports.refreshTmpDir = function() {
165165

166166
if (process.env.TEST_THREAD_ID) {
167167
exports.PORT += process.env.TEST_THREAD_ID * 100;
168-
exports.tmpDirName += `.${process.env.TEST_THREAD_ID}`;
168+
tmpDirName += `.${process.env.TEST_THREAD_ID}`;
169169
}
170-
exports.tmpDir = path.join(testRoot, exports.tmpDirName);
170+
exports.tmpDir = path.join(testRoot, tmpDirName);
171171

172172
let opensslCli = null;
173173
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(realpath, realpathSync, 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.