summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBenjamin Coe <bencoe@gmail.com>2019-01-18 13:46:49 -0800
committerBenjamin <bencoe@gmail.com>2019-01-20 14:21:16 -0800
commitd1dee495db1451e74f5364c8687148a53ff0b50d (patch)
tree362c6e33005c87c5d7df80a9e334590b23d62b76 /test
parentfac11b05b7fa36a936cce32f303a29dd093ac2dc (diff)
downloadandroid-node-v8-d1dee495db1451e74f5364c8687148a53ff0b50d.tar.gz
android-node-v8-d1dee495db1451e74f5364c8687148a53ff0b50d.tar.bz2
android-node-v8-d1dee495db1451e74f5364c8687148a53ff0b50d.zip
test: switch to native v8 coverage
PR-URL: https://github.com/nodejs/node/pull/25157 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/common/index.js9
-rw-r--r--test/parallel/test-bootstrap-modules.js3
2 files changed, 3 insertions, 9 deletions
diff --git a/test/common/index.js b/test/common/index.js
index dd67290020..eb9d511cb3 100644
--- a/test/common/index.js
+++ b/test/common/index.js
@@ -238,9 +238,6 @@ function platformTimeout(ms) {
if (process.features.debug)
ms = multipliers.two * ms;
- if (global.__coverage__)
- ms = multipliers.four * ms;
-
if (isAIX)
return multipliers.two * ms; // default localhost speed is slower on AIX
@@ -299,11 +296,7 @@ function leakedGlobals() {
}
}
- if (global.__coverage__) {
- return leaked.filter((varname) => !/^(?:cov_|__cov)/.test(varname));
- } else {
- return leaked;
- }
+ return leaked;
}
process.on('exit', function() {
diff --git a/test/parallel/test-bootstrap-modules.js b/test/parallel/test-bootstrap-modules.js
index 1fa5a643f6..87210ec344 100644
--- a/test/parallel/test-bootstrap-modules.js
+++ b/test/parallel/test-bootstrap-modules.js
@@ -9,7 +9,8 @@ const common = require('../common');
const assert = require('assert');
const isMainThread = common.isMainThread;
-const kMaxModuleCount = isMainThread ? 63 : 85;
+const kCoverageModuleCount = process.env.NODE_V8_COVERAGE ? 1 : 0;
+const kMaxModuleCount = (isMainThread ? 63 : 85) + kCoverageModuleCount;
assert(list.length <= kMaxModuleCount,
`Total length: ${list.length}\n` + list.join('\n')