Browse Source

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: https://github.com/nodejs/node/pull/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>
v4.x
Vse Mozhet Byt 9 years ago
committed by Myles Borins
parent
commit
21c1b8467e
  1. 8
      test/common.js

8
test/common.js

@ -8,17 +8,17 @@ var child_process = require('child_process');
const stream = require('stream');
const util = require('util');
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') &&

Loading…
Cancel
Save