Skip to content

Commit 99f8025

Browse files
emily-shenpenalosa
andauthored
fix c3 tests (#8491)
* add tab to types line * change line check * allow both old and new type format * Fix new types snapshot --------- Co-authored-by: Samuel Macleod <[email protected]>
1 parent e2472f1 commit 99f8025

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

packages/create-cloudflare/e2e-tests/frameworks.test.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,9 +389,14 @@ const verifyBuildCfTypesScript = async (
389389
expect(outputFileContentPostLines).not.toContain("// Generated by Wrangler");
390390

391391
// the file still contains the env interface
392-
expect(outputFileContentPostLines).toContain(
393-
`interface ${envInterfaceName} {`,
392+
const hasEnvInterface = outputFileContentPostLines.some(
393+
(line) =>
394+
// old type gen - some frameworkte templates pin older versions of wrangler
395+
line === `interface ${envInterfaceName} {` ||
396+
// new after importable env change
397+
line === `interface ${envInterfaceName} extends Cloudflare.Env {}`,
394398
);
399+
expect(hasEnvInterface).toBe(true);
395400
};
396401

397402
const verifyBuildScript = async (

0 commit comments

Comments
 (0)