Skip to content

test: app router instrumentation with cloudflare plugin#333

Merged
james-elicx merged 1 commit intomainfrom
j-branch-3
Mar 7, 2026
Merged

test: app router instrumentation with cloudflare plugin#333
james-elicx merged 1 commit intomainfrom
j-branch-3

Conversation

@james-elicx
Copy link
Collaborator

@james-elicx james-elicx commented Mar 7, 2026

runs certain tests against a vite dev instance with the cloudflare plugin

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 7, 2026

Open in StackBlitz

npm i https://pkg.pr.new/vinext@333

commit: 2f9ca82

@github-actions
Copy link

github-actions bot commented Mar 7, 2026

Example Preview Production Original
app-router-cloudflare preview production
pages-router-cloudflare preview production
app-router-playground preview production original
realworld-api-rest preview production
nextra-docs-template preview production
benchmarks preview production
hackernews preview production original

@james-elicx
Copy link
Collaborator Author

/bigbonk review

Copy link
Contributor

@ask-bonk ask-bonk bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean, well-scoped PR. The new cloudflare-dev Playwright project correctly runs vite dev (not wrangler dev) against the app-router-cloudflare example, which exercises configureServer() with @cloudflare/vite-plugin loaded — a code path that wasn't covered by the existing cloudflare-workers project (which only tests the build+wrangler production path).

A few observations:

Looks good:

  • The testMatch pattern mirrors the cloudflare-workers project structure: cloudflare-specific tests in a dedicated directory plus the shared instrumentation.spec.ts.
  • Port 4178 avoids conflicts with all existing projects (4173-4177).
  • The 30s timeout is appropriate for a dev server (no build step).
  • CI matrix entry is correct.

Minor note (non-blocking):

  • The tests/e2e/cloudflare-dev/ directory doesn't exist yet — the glob for **/cloudflare-dev/**/*.spec.ts will match nothing today, so the project currently only runs instrumentation.spec.ts. That's fine as a starting point; presumably cloudflare-dev-specific tests will be added in follow-up PRs.

LGTM — this adds meaningful coverage for the dev-mode Cloudflare path with minimal blast radius.

@ask-bonk
Copy link
Contributor

ask-bonk bot commented Mar 7, 2026

Approved PR #333. Here's a summary of the review:

Verdict: Approved

This is a clean, well-scoped addition. The new cloudflare-dev Playwright project runs vite dev against the app-router-cloudflare example, exercising configureServer() with @cloudflare/vite-plugin loaded — a code path that wasn't covered by the existing cloudflare-workers project (which only tests the build + wrangler production path).

The setup is correct: port 4178 avoids conflicts, the 30s timeout is appropriate for a dev server (no build step), and the CI matrix entry is properly added. The testMatch pattern mirrors the existing cloudflare-workers approach — a dedicated directory for future cloudflare-dev-specific tests plus the shared instrumentation.spec.ts.

One minor note: tests/e2e/cloudflare-dev/ doesn't exist yet, so only instrumentation.spec.ts runs today. That's fine as a starting point for follow-up work.

github run

@james-elicx james-elicx marked this pull request as ready for review March 7, 2026 23:04
@james-elicx james-elicx merged commit cb2bbc6 into main Mar 7, 2026
24 checks passed
@james-elicx james-elicx deleted the j-branch-3 branch March 7, 2026 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant