Skip to content

Commit

Permalink
test: add loaded modules test
Browse files Browse the repository at this point in the history
This makes sure there is no regression by switching to loading
eagerly.

PR-URL: nodejs#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>
  • Loading branch information
BridgeAR committed May 18, 2018
1 parent c07e851 commit 9deca87
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/parallel/test-bootstrap-modules.js
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit 9deca87

Please sign in to comment.