summaryrefslogtreecommitdiff
path: root/test/parallel/test-module-cjs-helpers.js
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2018-03-21 08:17:01 +0100
committerMichaël Zasso <targos@protonmail.com>2018-03-23 08:55:15 +0100
commita6f3e8f3fe653c48a48c877feec1c24306c3248e (patch)
tree69460190478aaa23d386049de906ba7d1aa0d8ca /test/parallel/test-module-cjs-helpers.js
parentc6c957d3cc3de335a0ccc25506d570b0a237a0ce (diff)
downloadandroid-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.js11
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);