diff --git a/test/parallel/test-repl.js b/test/parallel/test-repl.js index 74299d4b4cbad5..98a0bc79c64d91 100644 --- a/test/parallel/test-repl.js +++ b/test/parallel/test-repl.js @@ -209,7 +209,10 @@ const errorTests = [ // should throw { send: 'JSON.parse(\'{invalid: \\\'json\\\'}\');', - expect: [/^Uncaught SyntaxError: /] + expect: [ + 'Uncaught:', + /^SyntaxError: /, + ], }, // End of input to JSON.parse error is special case of syntax error, // should throw @@ -220,7 +223,10 @@ const errorTests = [ // should throw { send: 'JSON.parse(\'{\');', - expect: [/^Uncaught SyntaxError: /] + expect: [ + 'Uncaught:', + /^SyntaxError: /, + ], }, // invalid RegExps are a special case of syntax error, // should throw