diff --git a/test/common.js b/test/common.js index 668d98b108..3850bec06f 100644 --- a/test/common.js +++ b/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') &&