node/test/parallel/test-bootstrap-modules.js
Benjamin Coe d1dee495db
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>
2019-01-20 14:21:16 -08:00

18 lines
535 B
JavaScript

// Flags: --expose-internals
'use strict';
// This list must be computed before we require any modules to
// to eliminate the noise.
const list = process.moduleLoadList.slice();
const common = require('../common');
const assert = require('assert');
const isMainThread = common.isMainThread;
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')
);