Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 738aa30

Browse filesBrowse 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. PR-URL: #49639 Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent de5c009 commit 738aa30
Copy full SHA for 738aa30

File tree

Expand file treeCollapse file tree

1 file changed

+8
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-2
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-repl.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-repl.js
+8-2Lines changed: 8 additions & 2 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.