diff --git a/test/common.js b/test/common.js index e0ce68c835b483..3bbf7d87300ccc 100644 --- a/test/common.js +++ b/test/common.js @@ -32,7 +32,8 @@ exports.isOSX = process.platform === 'darwin'; exports.enoughTestMem = os.totalmem() > 0x40000000; /* 1 Gb */ const cpus = os.cpus(); -exports.enoughTestCpu = cpus.length > 1 || cpus[0].speed > 999; +exports.enoughTestCpu = Array.isArray(cpus) && + (cpus.length > 1 || cpus[0].speed > 999); exports.rootDir = exports.isWindows ? 'c:\\' : '/'; exports.buildType = process.config.target_defaults.default_configuration;