Skip to content

Commit

Permalink
fixup! repl: add auto‑completion for dynamic import calls
Browse files Browse the repository at this point in the history
  • Loading branch information
ExE-Boss committed Feb 3, 2021
1 parent 4264d4f commit 683a73d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/parallel/test-repl-tab-complete-import.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const common = require('../common');
const ArrayStream = require('../common/arraystream');
const fixtures = require('../common/fixtures');
const assert = require('assert');
const { inspect } = require('util');
const { builtinModules } = require('module');
const publicModules = builtinModules.filter(
(lib) => !lib.startsWith('_') && !lib.includes('/'),
Expand Down Expand Up @@ -127,7 +128,10 @@ testMe.complete("import\t( 'n", common.mustCall((error, data) => {
testMe.complete(input, common.mustCall((err, data) => {
assert.strictEqual(err, null);
assert.strictEqual(data.length, 2);
assert.strictEqual(data[1], path);
assert.strictEqual(data[1], path, `\
Expected SameValue(data[1], path) to be true.
path: ${inspect(path)}
data: ${inspect(data)}`);
assert.ok(data[0].includes('./test-repl-tab-complete.js'));
}));
});
Expand Down

0 comments on commit 683a73d

Please sign in to comment.