Skip to content

Commit a6d53b4

Browse files
committed
test: adapt REPL test to V8 changes
Syntax errors from `JSON.parse` contain more information and can now be printed on two lines if they are long.
1 parent 5f2c580 commit a6d53b4

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

test/parallel/test-repl.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,10 @@ const errorTests = [
209209
// should throw
210210
{
211211
send: 'JSON.parse(\'{invalid: \\\'json\\\'}\');',
212-
expect: [/^Uncaught SyntaxError: /]
212+
expect: [
213+
'Uncaught:',
214+
/^SyntaxError: /,
215+
],
213216
},
214217
// End of input to JSON.parse error is special case of syntax error,
215218
// should throw
@@ -220,7 +223,10 @@ const errorTests = [
220223
// should throw
221224
{
222225
send: 'JSON.parse(\'{\');',
223-
expect: [/^Uncaught SyntaxError: /]
226+
expect: [
227+
'Uncaught:',
228+
/^SyntaxError: /,
229+
],
224230
},
225231
// invalid RegExps are a special case of syntax error,
226232
// should throw

0 commit comments

Comments
 (0)