From 8a337dabefd1a4bf885ebd6fa915ff59f68d45db Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Mon, 28 Jul 2025 05:59:19 +0000 Subject: [PATCH] [autofix.ci] apply automated fixes --- test/bundler/top-level-await-async-keyword.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/bundler/top-level-await-async-keyword.test.ts b/test/bundler/top-level-await-async-keyword.test.ts index abb040227e..0c7a4f8e39 100644 --- a/test/bundler/top-level-await-async-keyword.test.ts +++ b/test/bundler/top-level-await-async-keyword.test.ts @@ -169,7 +169,7 @@ describe("bundler", () => { format: "esm", onAfterBundle(api) { const content = api.readFile("/out.js"); - + // All __esm functions in the chain should be async because level4 has top-level await // and the async requirement propagates up through the dependency chain if (content.includes("__esm(") && content.includes("await")) { @@ -177,7 +177,7 @@ describe("bundler", () => { if (badPattern.test(content)) { throw new Error("Found __esm(() => { await ... }) - missing async keyword in deep recursive chain!"); } - + // Should have multiple async __esm functions const asyncEsmCount = (content.match(/__esm\(async \(\) => \{/g) || []).length; if (asyncEsmCount === 0) { @@ -212,7 +212,7 @@ describe("bundler", () => { format: "esm", onAfterBundle(api) { const content = api.readFile("/out.js"); - + // In cyclical imports where one module has top-level await, // all modules in the cycle should get async __esm functions if (content.includes("__esm(") && content.includes("await")) { @@ -220,7 +220,7 @@ describe("bundler", () => { if (badPattern.test(content)) { throw new Error("Found __esm(() => { await ... }) - missing async keyword in cyclical imports!"); } - + // Should have multiple async __esm functions for the cyclical modules const asyncEsmCount = (content.match(/__esm\(async \(\) => \{/g) || []).length; if (asyncEsmCount < 2) {