- Version: N/A
- Platform: All
- Subsystem: test,bootstrap
| /* 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. |
| |
| constlist=process.moduleLoadList.slice(); |
| |
| constassert=require('assert'); |
| |
| assert(list.length<=78,list); |
The test uses a magic number that can only be reasonably found empeericaly. That number also changes depending on what CLI parameters are used, or if run with a test harness.
Some suggestions for improvement have been:
- blacklist some modules that we know we don’t want to have loaded unconditionally, rather than set a fixed number. (@addaleax)
- Just reports from the CI or add something informative to the test runner output. (@devsnek)
- ???
Refs: #23876
node/test/parallel/test-bootstrap-modules.js
Lines 1 to 14 in 5468509
The test uses a magic number that can only be reasonably found empeericaly. That number also changes depending on what CLI parameters are used, or if run with a test harness.
Some suggestions for improvement have been:
Refs: #23876