Skip to content

Commit 1ae076b

Browse files
BridgeARMylesBorins
authored andcommitted
test: add loaded modules test
This makes sure there is no regression by switching to loading eagerly. PR-URL: #20567 Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]>
1 parent eac7aad commit 1ae076b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/* eslint-disable node-core/required-modules */
2+
3+
'use strict';
4+
5+
// Ordinarily test files must require('common') but that action causes
6+
// the global console to be compiled, defeating the purpose of this test.
7+
// This makes sure no additional files are added without carefully considering
8+
// lazy loading. Please adjust the value if necessary.
9+
10+
const list = process.moduleLoadList.slice();
11+
12+
const assert = require('assert');
13+
14+
assert(list.length <= 73, list);

0 commit comments

Comments
 (0)