Files
wehub-resource-sync 70bf21e064
Deploy (to testing) and Test Playground Preview Worker / Deploy Playground Preview Worker (testing) (push) Has been skipped
Deploy Workers Shared Staging / Deploy Workers Shared Staging (push) Failing after 0s
Prerelease / build (push) Has been skipped
Handle Changesets / Handle Changesets (push) Has been cancelled
Semgrep OSS scan / semgrep-oss (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:30:11 +08:00

23 lines
865 B
TypeScript

import { describe, test } from "vitest";
import { runLongLived, seed } from "./helpers.js";
describe("invalid Wrangler version e2e tests", () => {
// Only test with pnpm;
// npm and yarn don't hoist peer dependencies in the same way as pnpm;
// so having a different peer Wrangler doesn't mess up the internal dependency
const projectPath = seed("invalid-wrangler-version", {
pm: "pnpm",
useStrictPeerDeps: false,
});
test("`vite dev` will error when peer installed wrangler version overrides the expected internal dependency", async ({
expect,
}) => {
const proc = await runLongLived("pnpm", "dev", projectPath);
expect(await proc.exitCode).not.toBe(0);
expect(proc.stderr).toMatch(
/The installed version of Wrangler \(4\.20\.0\) does not satisfy the peer dependency required by @cloudflare\/vite-plugin \(\^\d+\.\d+\.\d+\)/
);
});
});