Skip to content

Commit

Permalink
test repair
Browse files Browse the repository at this point in the history
  • Loading branch information
mert authored and mert committed Dec 10, 2024
1 parent c3a13fb commit bb74388
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/es-module/test-esm-detect-ambiguous.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ describe('Module syntax detection', { concurrency: !process.env.TEST_PARALLEL },
});

it('permits top-level `await` above import/export syntax', async () => {
const { stdout, stderr, code } = await spawnPromisified(process.execPath, [
const { stdout, stderr, code, signal } = await spawnPromisified(process.execPath, [
'--eval',
'await Promise.resolve(); import "node:os"; console.log("executed");',
]);
Expand All @@ -282,6 +282,7 @@ describe('Module syntax detection', { concurrency: !process.env.TEST_PARALLEL },
);
strictEqual(stdout, '');
strictEqual(code, 1);
strictEqual(signal, null);
});

it('still throws on `await` in an ordinary sync function', async () => {
Expand Down

0 comments on commit bb74388

Please sign in to comment.