mirror of
https://github.com/nodejs/node.git
synced 2025-05-07 17:32:22 +00:00

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>
18 lines
535 B
JavaScript
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')
|
|
);
|