summaryrefslogtreecommitdiff
path: root/test/parallel/test-bootstrap-modules.js
blob: 73e47ed9d502e046e08dbbf95775725be0092010 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// 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 ? 64 : 86) + kCoverageModuleCount;

assert(list.length <= kMaxModuleCount,
       `Total length: ${list.length}\n` + list.join('\n')
);