Skip to content

Commit

Permalink
test: adapt to new JSON SyntaxError messages
Browse files Browse the repository at this point in the history
Refs: https://chromium-review.googlesource.com/c/v8/v8/+/3513684
PR-URL: #44741
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
targos committed Oct 11, 2022
1 parent b5f1564 commit 71c193e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/es-module/test-esm-data-urls.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function createBase64URL(mime, body) {
import('data:application/json;foo="test,",0',
{ assert: { type: 'json' } }), {
name: 'SyntaxError',
message: /Unexpected end of JSON input/
message: /Unterminated string in JSON at position 3/
});
}
{
Expand Down
3 changes: 2 additions & 1 deletion test/es-module/test-esm-invalid-pjson.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ describe('ESM: Package.json', { concurrency: true }, () => {
stderr.includes(
`[ERR_INVALID_PACKAGE_CONFIG]: Invalid package config ${invalidJson} ` +
`while importing "invalid-pjson" from ${entry}. ` +
`Unexpected token } in JSON at position ${12 + checkoutEOL.length * 2}`
"Expected ':' after property name in JSON at position " +
`${12 + checkoutEOL.length * 2}`
),
stderr
);
Expand Down

0 comments on commit 71c193e

Please sign in to comment.