Skip to content

Commit 354f6a5

Browse files
committed
esm: fix linting errors after rebase
Remove unused ArrayPrototypeSome import and fix assert usage.
1 parent 0dfdc54 commit 354f6a5

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

lib/internal/modules/esm/module_job.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ const {
55
ArrayPrototypeFind,
66
ArrayPrototypeJoin,
77
ArrayPrototypePush,
8-
ArrayPrototypeSome,
98
FunctionPrototype,
109
ObjectSetPrototypeOf,
1110
PromisePrototypeThen,

test/es-module/test-esm-detect-ambiguous.mjs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -443,8 +443,8 @@ describe('cjs & esm ambiguous syntax case', () => {
443443
/ReferenceError: Cannot determine intended module format because both 'require' and top-level await are present\. If the code is intended to be CommonJS, wrap await in an async function\. If the code is intended to be an ES module, replace require\(\) with import\./
444444
);
445445

446-
strictEqual(code, 1);
447-
strictEqual(signal, null);
446+
assert.strictEqual(code, 1);
447+
assert.strictEqual(signal, null);
448448
});
449449

450450
it('should throw an ambiguous syntax error when using top-level await with exports', async () => {
@@ -456,13 +456,13 @@ describe('cjs & esm ambiguous syntax case', () => {
456456
]
457457
);
458458

459-
match(
459+
assert.match(
460460
stderr,
461461
/ReferenceError: Cannot determine intended module format because both 'exports' and top-level await are present\. If the code is intended to be CommonJS, wrap await in an async function\. If the code is intended to be an ES module, use export instead of module\.exports\/exports\./
462462
);
463463

464-
strictEqual(code, 1);
465-
strictEqual(signal, null);
464+
assert.strictEqual(code, 1);
465+
assert.strictEqual(signal, null);
466466
});
467467

468468
it('should throw an ambiguous syntax error when using top-level await with __filename', async () => {
@@ -474,13 +474,13 @@ describe('cjs & esm ambiguous syntax case', () => {
474474
]
475475
);
476476

477-
match(
477+
assert.match(
478478
stderr,
479479
/ReferenceError: Cannot determine intended module format because both '__filename' and top-level await are present\. If the code is intended to be CommonJS, wrap await in an async function\. If the code is intended to be an ES module, use import\.meta\.filename instead\./
480480
);
481481

482-
strictEqual(code, 1);
483-
strictEqual(signal, null);
482+
assert.strictEqual(code, 1);
483+
assert.strictEqual(signal, null);
484484
});
485485

486486
it('should throw an ambiguous syntax error when using top-level await with __dirname', async () => {
@@ -492,7 +492,7 @@ describe('cjs & esm ambiguous syntax case', () => {
492492
]
493493
);
494494

495-
match(
495+
assert.match(
496496
stderr,
497497
/ReferenceError: Cannot determine intended module format because both '__dirname' and top-level await are present\. If the code is intended to be CommonJS, wrap await in an async function\. If the code is intended to be an ES module, use import\.meta\.dirname instead\./
498498
);

0 commit comments

Comments
 (0)