diff options
author | Michaël Zasso <targos@protonmail.com> | 2018-03-21 08:17:01 +0100 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2018-03-23 08:55:15 +0100 |
commit | a6f3e8f3fe653c48a48c877feec1c24306c3248e (patch) | |
tree | 69460190478aaa23d386049de906ba7d1aa0d8ca /test/parallel/test-module-cjs-helpers.js | |
parent | c6c957d3cc3de335a0ccc25506d570b0a237a0ce (diff) | |
download | android-node-v8-a6f3e8f3fe653c48a48c877feec1c24306c3248e.tar.gz android-node-v8-a6f3e8f3fe653c48a48c877feec1c24306c3248e.tar.bz2 android-node-v8-a6f3e8f3fe653c48a48c877feec1c24306c3248e.zip |
repl: fix tab completion of inspector module
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>
Diffstat (limited to 'test/parallel/test-module-cjs-helpers.js')
-rw-r--r-- | test/parallel/test-module-cjs-helpers.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/parallel/test-module-cjs-helpers.js b/test/parallel/test-module-cjs-helpers.js new file mode 100644 index 0000000000..1ed9746198 --- /dev/null +++ b/test/parallel/test-module-cjs-helpers.js @@ -0,0 +1,11 @@ +'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); |