From 3f16d13fe2bd4ab423390b753072be0af970c602 Mon Sep 17 00:00:00 2001 From: eladkeyshawn Date: Fri, 9 Apr 2021 15:55:40 +0300 Subject: [PATCH] add test --- lib/internal/repl/utils.js | 2 +- test/parallel/test-repl-history-navigation.js | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/internal/repl/utils.js b/lib/internal/repl/utils.js index a1c7ef8a81a5a1..63988978d12afb 100644 --- a/lib/internal/repl/utils.js +++ b/lib/internal/repl/utils.js @@ -394,7 +394,7 @@ function setupPreview(repl, contextSymbol, bufferSymbol, active) { } const inputPreviewCallback = (error, inspected) => { - if (inspected === null) { + if (inspected == null) { return; } diff --git a/test/parallel/test-repl-history-navigation.js b/test/parallel/test-repl-history-navigation.js index 4dd9c350229b19..df9a468f221d37 100644 --- a/test/parallel/test-repl-history-navigation.js +++ b/test/parallel/test-repl-history-navigation.js @@ -68,6 +68,8 @@ const prev = process.features.inspector; let completions = 0; +process.on('warning', common.mustNotCall()); + const tests = [ { // Creates few history to navigate for env: { NODE_REPL_HISTORY: defaultHistoryPath }, @@ -554,6 +556,13 @@ const tests = [ expected: [], clean: false }, + { + env: { NODE_REPL_HISTORY: defaultHistoryPath }, + test: [ 'const util = {}', ENTER, + 'ut', RIGHT, ENTER], + expected: [], + clean: false + }, ]; const numtests = tests.length;