node/test/parallel/test-bootstrap-modules.js
Joyee Cheung 4fe66a3c7f test: bump test-bootstrap-modules.js limit
PR-URL: https://github.com/nodejs/node/pull/26520
Fixes: https://github.com/nodejs/node/issues/26528
Refs: https://github.com/nodejs/node/pull/25594
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-03-08 13:09:28 -05: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 ? 65 : 87) + kCoverageModuleCount;
assert(list.length <= kMaxModuleCount,
`Total length: ${list.length}\n` + list.join('\n')
);