Skip to content

Commit 3f16d13

Browse files
committed
add test
1 parent 306bdf7 commit 3f16d13

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

lib/internal/repl/utils.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ function setupPreview(repl, contextSymbol, bufferSymbol, active) {
394394
}
395395

396396
const inputPreviewCallback = (error, inspected) => {
397-
if (inspected === null) {
397+
if (inspected == null) {
398398
return;
399399
}
400400

test/parallel/test-repl-history-navigation.js

+9
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ const prev = process.features.inspector;
6868

6969
let completions = 0;
7070

71+
process.on('warning', common.mustNotCall());
72+
7173
const tests = [
7274
{ // Creates few history to navigate for
7375
env: { NODE_REPL_HISTORY: defaultHistoryPath },
@@ -554,6 +556,13 @@ const tests = [
554556
expected: [],
555557
clean: false
556558
},
559+
{
560+
env: { NODE_REPL_HISTORY: defaultHistoryPath },
561+
test: [ 'const util = {}', ENTER,
562+
'ut', RIGHT, ENTER],
563+
expected: [],
564+
clean: false
565+
},
557566
];
558567
const numtests = tests.length;
559568

0 commit comments

Comments
 (0)