node/test/parallel/test-bootstrap-modules.js
Joyee Cheung cfc2559ee0
console: split console into global.js and constructor.js
Since we do not actually use the Console constructor to
instantiate the global console, move the two piece of
code into two different JS files for clarity, and make
console.js a mere re-export of the global console.
The hope is to make the global console, a namespace, more
web-compatible while keeping the Console constructor
available for backwards compatibility.

PR-URL: https://github.com/nodejs/node/pull/24709
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-12-02 04:51:18 +08:00

17 lines
443 B
JavaScript

// 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 kMaxModuleCount = isMainThread ? 58 : 80;
assert(list.length <= kMaxModuleCount,
`Total length: ${list.length}\n` + list.join('\n')
);