mirror of
https://github.com/nodejs/node.git
synced 2025-05-07 12:03:30 +00:00

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>
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 ? 65 : 87) + kCoverageModuleCount;
|
|
|
|
assert(list.length <= kMaxModuleCount,
|
|
`Total length: ${list.length}\n` + list.join('\n')
|
|
);
|