summaryrefslogtreecommitdiff
path: root/net-libs/nodejs/files/nodejs-16.1.0-test-repl-history-navigation.patch
blob: 724541a870db369fb67892b893d67b20056da87b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
From 7c8a60851c459ea18afbfc54bfc8cf7394ea56c3 Mon Sep 17 00:00:00 2001
From: Antoine du Hamel <duhamelantoine1995@gmail.com>
Date: Thu, 6 May 2021 12:00:07 +0200
Subject: [PATCH] test,repl: fix tests when inspector is disabled

Fixes: https://github.com/nodejs/node/issues/38558

PR-URL: https://github.com/nodejs/node/pull/38564
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
---
 test/parallel/test-repl-history-navigation.js | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/test/parallel/test-repl-history-navigation.js b/test/parallel/test-repl-history-navigation.js
index df4f0390a69c..527cf235bddd 100644
--- a/test/parallel/test-repl-history-navigation.js
+++ b/test/parallel/test-repl-history-navigation.js
@@ -559,14 +559,14 @@ const tests = [
     env: { NODE_REPL_HISTORY: defaultHistoryPath },
     test: ['const util = {}', ENTER,
            'ut', RIGHT, ENTER],
-    expected: common.hasIntl && common.hasCrypto ? [
+    expected: [
       prompt, ...'const util = {}',
       'undefined\n',
-      prompt, ...'ut', ' // il', '\n// {}',
-      'il', '\n// {}',
+      prompt, ...'ut', ...(prev ? [' // il', '\n// {}',
+                                   'il', '\n// {}'] : [' // il', 'il']),
       '{}\n',
       prompt,
-    ] : [],
+    ],
     clean: false
   },
   {
@@ -577,7 +577,7 @@ const tests = [
       'globalThis.util = {}', ENTER,
       'ut', RIGHT, ENTER,
       'Reflect.defineProperty(globalThis, "util", utilDesc)', ENTER],
-    expected: common.hasIntl && common.hasCrypto ? [
+    expected: [
       prompt, ...'const utilDesc = ' +
       'Reflect.getOwnPropertyDescriptor(globalThis, "util")',
       'undefined\n',
@@ -588,7 +588,7 @@ const tests = [
       prompt, ...'Reflect.defineProperty(globalThis, "util", utilDesc)',
       'true\n',
       prompt,
-    ] : [],
+    ],
     clean: false
   },
 ];