mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
Correctly check for the presence of the inspector module before adding it to the builtin libs list. PR-URL: https://github.com/nodejs/node/pull/19505 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yuta Hiroto <hello@hiroppy.me> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
12 lines
339 B
JavaScript
12 lines
339 B
JavaScript
'use strict';
|
|
// Flags: --expose-internals
|
|
|
|
require('../common');
|
|
const assert = require('assert');
|
|
const { builtinLibs } = require('internal/modules/cjs/helpers');
|
|
|
|
const hasInspector = process.config.variables.v8_enable_inspector === 1;
|
|
|
|
const expectedLibs = hasInspector ? 32 : 31;
|
|
assert.strictEqual(builtinLibs.length, expectedLibs);
|