Skip to content

Commit 71c193e

Browse files
committed
test: adapt to new JSON SyntaxError messages
Refs: https://chromium-review.googlesource.com/c/v8/v8/+/3513684 PR-URL: #44741 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent b5f1564 commit 71c193e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

test/es-module/test-esm-data-urls.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ function createBase64URL(mime, body) {
7676
import('data:application/json;foo="test,",0',
7777
{ assert: { type: 'json' } }), {
7878
name: 'SyntaxError',
79-
message: /Unexpected end of JSON input/
79+
message: /Unterminated string in JSON at position 3/
8080
});
8181
}
8282
{

test/es-module/test-esm-invalid-pjson.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ describe('ESM: Package.json', { concurrency: true }, () => {
1818
stderr.includes(
1919
`[ERR_INVALID_PACKAGE_CONFIG]: Invalid package config ${invalidJson} ` +
2020
`while importing "invalid-pjson" from ${entry}. ` +
21-
`Unexpected token } in JSON at position ${12 + checkoutEOL.length * 2}`
21+
"Expected ':' after property name in JSON at position " +
22+
`${12 + checkoutEOL.length * 2}`
2223
),
2324
stderr
2425
);

0 commit comments

Comments
 (0)