Skip to content

Commit

Permalink
esm: improve performance & tidy tests
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Aug 22, 2022
1 parent c137633 commit 8b3177b
Showing 1 changed file with 11 additions and 16 deletions.
27 changes: 11 additions & 16 deletions patches/node/json_parse_errors_made_user-friendly.patch
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,16 @@ index 9d0deb70a1568c93ccdecbef59327ecb2a17ae5e..2ab8f2bdcf7cca1437df33668c4177a7
}
{
diff --git a/test/es-module/test-esm-invalid-pjson.js b/test/es-module/test-esm-invalid-pjson.js
index cdbebb17b4bb34421a2f98c384650d495908885c..12247f15dbaddc0e06f1e6aff09faf7a035cf43a 100644
index f3a38018637aa349ad79617ab9835e61d7058fe9..bc78b870c84c4baedecdd7ffc1157c86c307cebf 100644
--- a/test/es-module/test-esm-invalid-pjson.js
+++ b/test/es-module/test-esm-invalid-pjson.js
@@ -17,11 +17,13 @@ child.stderr.on('data', (data) => {
child.on('close', mustCall((code, signal) => {
strictEqual(code, 1);
strictEqual(signal, null);
+ console.log('STDERR is: ', stderr);
+ console.log('DONE STDERR');
ok(
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);
}));
@@ -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
);

0 comments on commit 8b3177b

Please sign in to comment.