Skip to content

Commit

Permalink
test: decrease inconsistency in the common.js
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-By: Jeremiah Senkpiel <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
  • Loading branch information
vsemozhetbyt authored and cjihrig committed Aug 10, 2016
1 parent fecf611 commit 4aee970
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ const stream = require('stream');
const util = require('util');
const Timer = process.binding('timer_wrap').Timer;

const testRoot = path.resolve(process.env.NODE_TEST_DIR ||
path.dirname(__filename));
const testRoot = process.env.NODE_TEST_DIR ?
path.resolve(process.env.NODE_TEST_DIR) : __dirname;

exports.testDir = path.dirname(__filename);
exports.testDir = __dirname;
exports.fixturesDir = path.join(exports.testDir, 'fixtures');
exports.libDir = path.join(exports.testDir, '../lib');
exports.tmpDirName = 'tmp';
exports.PORT = +process.env.NODE_COMMON_PORT || 12346;
exports.isWindows = process.platform === 'win32';
exports.isWOW64 = exports.isWindows &&
(process.env['PROCESSOR_ARCHITEW6432'] !== undefined);
(process.env.PROCESSOR_ARCHITEW6432 !== undefined);
exports.isAix = process.platform === 'aix';
exports.isLinuxPPCBE = (process.platform === 'linux') &&
(process.arch === 'ppc64') &&
Expand Down

0 comments on commit 4aee970

Please sign in to comment.