diff --git a/packages/create-cloudflare/e2e-tests/frameworks.test.ts b/packages/create-cloudflare/e2e-tests/frameworks.test.ts index a016b525b469..562281e2aeba 100644 --- a/packages/create-cloudflare/e2e-tests/frameworks.test.ts +++ b/packages/create-cloudflare/e2e-tests/frameworks.test.ts @@ -389,9 +389,14 @@ const verifyBuildCfTypesScript = async ( expect(outputFileContentPostLines).not.toContain("// Generated by Wrangler"); // the file still contains the env interface - expect(outputFileContentPostLines).toContain( - `interface ${envInterfaceName} {`, + const hasEnvInterface = outputFileContentPostLines.some( + (line) => + // old type gen - some frameworkte templates pin older versions of wrangler + line === `interface ${envInterfaceName} {` || + // new after importable env change + line === `interface ${envInterfaceName} extends Cloudflare.Env {}`, ); + expect(hasEnvInterface).toBe(true); }; const verifyBuildScript = async (