From 27e0ebefd3f4621927c389092632f01cf9ab4e7e Mon Sep 17 00:00:00 2001 From: James Date: Sat, 7 Mar 2026 22:50:11 +0000 Subject: [PATCH] test: app router instrumentation with cloudflare plugin --- .github/workflows/ci.yml | 1 + playwright.config.ts | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d9f2c1cb..ae0e74f4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -103,6 +103,7 @@ jobs: - cloudflare-pages-router - pages-router-prod - cloudflare-workers + - cloudflare-dev steps: - uses: actions/checkout@v4 - uses: ./.github/actions/setup-node-pnpm diff --git a/playwright.config.ts b/playwright.config.ts index 717556b2..08fa216b 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -68,6 +68,23 @@ const projectServers = { timeout: 60_000, }, }, + "cloudflare-dev": { + testDir: "./tests/e2e", + testMatch: [ + "**/cloudflare-dev/**/*.spec.ts", + "**/app-router/instrumentation.spec.ts", + ], + use: { baseURL: "http://localhost:4178" }, + server: { + // Run vite dev (not wrangler) against the cloudflare example so that + // configureServer() is exercised with @cloudflare/vite-plugin loaded. + command: "npx vite --port 4178", + cwd: "./examples/app-router-cloudflare", + port: 4178, + reuseExistingServer: !process.env.CI, + timeout: 30_000, + }, + }, }; type ProjectName = keyof typeof projectServers;