From 954f3f8dcea4fd1fd99e710a9e8a71ed0ed9492e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Sat, 18 Jun 2022 09:02:31 +0200 Subject: [PATCH] test: adapt to new JSON SyntaxError messages Refs: https://chromium-review.googlesource.com/c/v8/v8/+/3513684 --- test/es-module/test-esm-data-urls.js | 2 +- test/es-module/test-esm-invalid-pjson.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/es-module/test-esm-data-urls.js b/test/es-module/test-esm-data-urls.js index 5be45d0f7af..7ba7c5f4fb1 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: /Unterminated string in JSON at position 3/ }); } { diff --git a/test/es-module/test-esm-invalid-pjson.js b/test/es-module/test-esm-invalid-pjson.js index cdbebb17b4b..83a46e331f9 100644 --- a/test/es-module/test-esm-invalid-pjson.js +++ b/test/es-module/test-esm-invalid-pjson.js @@ -21,7 +21,7 @@ child.on('close', mustCall((code, signal) => { 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); }));