diff --git a/test/parallel/test-repl-history-navigation.js b/test/parallel/test-repl-history-navigation.js index 527cf235bddd21..05b5a275e3f455 100644 --- a/test/parallel/test-repl-history-navigation.js +++ b/test/parallel/test-repl-history-navigation.js @@ -563,7 +563,7 @@ const tests = [ prompt, ...'const util = {}', 'undefined\n', prompt, ...'ut', ...(prev ? [' // il', '\n// {}', - 'il', '\n// {}'] : [' // il', 'il']), + 'il', '\n// {}'] : ['il']), '{}\n', prompt, ], @@ -583,7 +583,8 @@ const tests = [ 'undefined\n', prompt, ...'globalThis.util = {}', '{}\n', - prompt, ...'ut', ' // il', 'il', + prompt, ...'ut', ...(prev ? [' // il', '\n// {}', + 'il', '\n// {}'] : ['il']), '{}\n', prompt, ...'Reflect.defineProperty(globalThis, "util", utilDesc)', 'true\n',