Skip to content

Commit 842fd23

Browse files
committed
test: adapt test-repl to V8 9.5
Syntax errors for RegExp literals now show hint to error location. PR-URL: #40178 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent d7b9b9f commit 842fd23

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

test/parallel/test-repl.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ async function runReplTests(socket, prompt, tests) {
8686

8787
console.error('in:', JSON.stringify(actualLine));
8888

89-
// Match a string directly, or a RegExp through .test().
89+
// Match a string directly, or a RegExp.
9090
if (typeof expectedLine === 'string') {
9191
assert.strictEqual(actualLine, expectedLine);
9292
} else {
@@ -226,7 +226,12 @@ const errorTests = [
226226
// should throw
227227
{
228228
send: '/(/;',
229-
expect: [/^Uncaught SyntaxError: /]
229+
expect: [
230+
kSource,
231+
kArrow,
232+
'',
233+
/^Uncaught SyntaxError: /,
234+
]
230235
},
231236
// invalid RegExp modifiers are a special case of syntax error,
232237
// should throw (GH-4012)

0 commit comments

Comments
 (0)