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 <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
  • Loading branch information
vsemozhetbyt authored and addaleax committed Aug 1, 2016
1 parent df4ef63 commit 0de55d8
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 0de55d8

Please sign in to comment.