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); }));