-
Notifications
You must be signed in to change notification settings - Fork 15k
/
json_parse_errors_made_user-friendly.patch
33 lines (31 loc) · 1.62 KB
/
json_parse_errors_made_user-friendly.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: John Kleinschmidt <jkleinsc@electronjs.org>
Date: Thu, 26 May 2022 17:08:33 -0400
Subject: JSON.parse errors made user-friendly
Update tests for https://chromium-review.googlesource.com/c/v8/v8/+/3513684
diff --git a/test/es-module/test-esm-data-urls.js b/test/es-module/test-esm-data-urls.js
index 5be45d0f7af3b6dd483fe3b185c76e41a1bf533b..a99dde30c3d977dfc226a33f632f5f69638892af 100644
--- a/test/es-module/test-esm-data-urls.js
+++ b/test/es-module/test-esm-data-urls.js
@@ -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: 'data:application/json;foo="test,",0: Unterminated string in JSON at position 3 (line 1 column 4)'
});
}
{
diff --git a/test/es-module/test-esm-invalid-pjson.js b/test/es-module/test-esm-invalid-pjson.js
index f3a38018637aa349ad79617ab9835e61d7058fe9..bc78b870c84c4baedecdd7ffc1157c86c307cebf 100644
--- a/test/es-module/test-esm-invalid-pjson.js
+++ b/test/es-module/test-esm-invalid-pjson.js
@@ -18,7 +18,7 @@ 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
);