From c943cd09a7da202ad878fdd2a6b26d99ce488403 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Tue, 26 Dec 2017 10:49:36 +0100 Subject: [PATCH] test: fix repl-tab-complete --without-ssl Currently, when configured --without-ssl test-repl-tab-complete fails with the following error: assert.js:43 throw new errors.AssertionError(obj); ^ AssertionError [ERR_ASSERTION]: [ [], 'lexicalL' ] deepStrictEqual [] at testRepl.complete.common.mustCall (node/test/parallel/test-repl-tab-complete.js:549:14) at /node/test/common/index.js:530:15 at completionGroupsLoaded (repl.js:1204:5) at REPLServer.complete (repl.js:1090:11) at REPLServer.completer (repl.js:450:14) at REPLServer.complete (repl.js:919:18) at __dirname.forEach (parallel/test-repl-tab-complete.js:548:14) at Array.forEach () at Object. (parallel/test-repl-tab-complete.js:545:29) at Module._compile (module.js:660:30) This commit attempts to fix this test but I'm not sure if this is a proper fix as I'm not familiar with the repl code base yet. PR-URL: https://github.com/nodejs/node/pull/17867 Reviewed-By: James M Snell Reviewed-By: Ruben Bridgewater --- test/parallel/test-repl-tab-complete.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/parallel/test-repl-tab-complete.js b/test/parallel/test-repl-tab-complete.js index c9048d887d5cab..6485f8bd17f58b 100644 --- a/test/parallel/test-repl-tab-complete.js +++ b/test/parallel/test-repl-tab-complete.js @@ -544,7 +544,8 @@ editor.completer('var log = console.l', common.mustCall((error, data) => { ['Let', 'Const', 'Klass'].forEach((type) => { const query = `lexical${type[0]}`; - const expected = hasInspector ? [[`lexical${type}`], query] : []; + const expected = hasInspector ? [[`lexical${type}`], query] : + [[], `lexical${type[0]}`]; testRepl.complete(query, common.mustCall((error, data) => { assert.deepStrictEqual(data, expected); }));