diff --git a/test/es-module/test-esm-data-urls.js b/test/es-module/test-esm-data-urls.js index 5be45d0f7af3b6..7ba7c5f4fb1088 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 f3a38018637aa3..9b49f6f1357685 100644 --- a/test/es-module/test-esm-invalid-pjson.js +++ b/test/es-module/test-esm-invalid-pjson.js @@ -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 );