Skip to content

Commit 7c8a608

Browse files
committed
test,repl: fix tests when inspector is disabled
Fixes: #38558 PR-URL: #38564 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent 1b11398 commit 7c8a608

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

+6-6
Original file line numberDiff line numberDiff line change
@@ -559,14 +559,14 @@ const tests = [
559559
env: { NODE_REPL_HISTORY: defaultHistoryPath },
560560
test: ['const util = {}', ENTER,
561561
'ut', RIGHT, ENTER],
562-
expected: common.hasIntl && common.hasCrypto ? [
562+
expected: [
563563
prompt, ...'const util = {}',
564564
'undefined\n',
565-
prompt, ...'ut', ' // il', '\n// {}',
566-
'il', '\n// {}',
565+
prompt, ...'ut', ...(prev ? [' // il', '\n// {}',
566+
'il', '\n// {}'] : [' // il', 'il']),
567567
'{}\n',
568568
prompt,
569-
] : [],
569+
],
570570
clean: false
571571
},
572572
{
@@ -577,7 +577,7 @@ const tests = [
577577
'globalThis.util = {}', ENTER,
578578
'ut', RIGHT, ENTER,
579579
'Reflect.defineProperty(globalThis, "util", utilDesc)', ENTER],
580-
expected: common.hasIntl && common.hasCrypto ? [
580+
expected: [
581581
prompt, ...'const utilDesc = ' +
582582
'Reflect.getOwnPropertyDescriptor(globalThis, "util")',
583583
'undefined\n',
@@ -588,7 +588,7 @@ const tests = [
588588
prompt, ...'Reflect.defineProperty(globalThis, "util", utilDesc)',
589589
'true\n',
590590
prompt,
591-
] : [],
591+
],
592592
clean: false
593593
},
594594
];

0 commit comments

Comments
 (0)