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 4aee970

Browse filesBrowse files
vsemozhetbytcjihrig
authored andcommitted
test: decrease inconsistency in the common.js
1. `process.env['PROCESSOR_ARCHITEW6432']` -> `process.env.PROCESSOR_ARCHITEW6432`. 2. `path.dirname(__filename)` -> `__dirname`. 3. `path.resolve(__dirname)` -> `__dirname`. PR-URL: #7758 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
1 parent fecf611 commit 4aee970
Copy full SHA for 4aee970

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

‎test/common.js‎

Copy file name to clipboardExpand all lines: test/common.js
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ const stream = require('stream');
99
const util = require('util');
1010
const Timer = process.binding('timer_wrap').Timer;
1111

12-
const testRoot = path.resolve(process.env.NODE_TEST_DIR ||
13-
path.dirname(__filename));
12+
const testRoot = process.env.NODE_TEST_DIR ?
13+
path.resolve(process.env.NODE_TEST_DIR) : __dirname;
1414

15-
exports.testDir = path.dirname(__filename);
15+
exports.testDir = __dirname;
1616
exports.fixturesDir = path.join(exports.testDir, 'fixtures');
1717
exports.libDir = path.join(exports.testDir, '../lib');
1818
exports.tmpDirName = 'tmp';
1919
exports.PORT = +process.env.NODE_COMMON_PORT || 12346;
2020
exports.isWindows = process.platform === 'win32';
2121
exports.isWOW64 = exports.isWindows &&
22-
(process.env['PROCESSOR_ARCHITEW6432'] !== undefined);
22+
(process.env.PROCESSOR_ARCHITEW6432 !== undefined);
2323
exports.isAix = process.platform === 'aix';
2424
exports.isLinuxPPCBE = (process.platform === 'linux') &&
2525
(process.arch === 'ppc64') &&

0 commit comments

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