test: add loaded modules test
This makes sure there is no regression by switching to loading eagerly. PR-URL: https://github.com/nodejs/node/pull/20567 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
This commit is contained in:
parent
c07e85123e
commit
9deca876bb
14
test/parallel/test-bootstrap-modules.js
Normal file
14
test/parallel/test-bootstrap-modules.js
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
/* eslint-disable node-core/required-modules */
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
// Ordinarily test files must require('common') but that action causes
|
||||||
|
// the global console to be compiled, defeating the purpose of this test.
|
||||||
|
// This makes sure no additional files are added without carefully considering
|
||||||
|
// lazy loading. Please adjust the value if necessary.
|
||||||
|
|
||||||
|
const list = process.moduleLoadList.slice();
|
||||||
|
|
||||||
|
const assert = require('assert');
|
||||||
|
|
||||||
|
assert(list.length <= 73, list);
|
Loading…
x
Reference in New Issue
Block a user