mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00
test: adapt to new JSON SyntaxError messages
Refs: 3513684
PR-URL: https://github.com/nodejs/node/pull/44741
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
b5f1564880
commit
71c193e581
2 changed files with 3 additions and 2 deletions
|
@ -76,7 +76,7 @@ function createBase64URL(mime, body) {
|
||||||
import('data:application/json;foo="test,",0',
|
import('data:application/json;foo="test,",0',
|
||||||
{ assert: { type: 'json' } }), {
|
{ assert: { type: 'json' } }), {
|
||||||
name: 'SyntaxError',
|
name: 'SyntaxError',
|
||||||
message: /Unexpected end of JSON input/
|
message: /Unterminated string in JSON at position 3/
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,7 +18,8 @@ describe('ESM: Package.json', { concurrency: true }, () => {
|
||||||
stderr.includes(
|
stderr.includes(
|
||||||
`[ERR_INVALID_PACKAGE_CONFIG]: Invalid package config ${invalidJson} ` +
|
`[ERR_INVALID_PACKAGE_CONFIG]: Invalid package config ${invalidJson} ` +
|
||||||
`while importing "invalid-pjson" from ${entry}. ` +
|
`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
|
stderr
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue