Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
eladkishon committed Apr 9, 2021
1 parent 306bdf7 commit 3f16d13
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/repl/utils.js
Expand Up @@ -394,7 +394,7 @@ function setupPreview(repl, contextSymbol, bufferSymbol, active) {
}

const inputPreviewCallback = (error, inspected) => {
if (inspected === null) {
if (inspected == null) {
return;
}

Expand Down
9 changes: 9 additions & 0 deletions test/parallel/test-repl-history-navigation.js
Expand Up @@ -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 },
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 3f16d13

Please sign in to comment.