Skip to content

test: add testing framework with Vitest Workers pool and Playwright#9

Open
nshen wants to merge 2 commits intodevfrom
feat/testing-framework
Open

test: add testing framework with Vitest Workers pool and Playwright#9
nshen wants to merge 2 commits intodevfrom
feat/testing-framework

Conversation

@nshen
Copy link
Copy Markdown
Owner

@nshen nshen commented Apr 7, 2026

Summary

  • apps/server: Vitest + @cloudflare/vitest-pool-workers v0.14 — integration tests running in real miniflare Workers runtime with D1/KV bindings
  • apps/web: Playwright E2E framework with Chromium + auto dev server startup
  • docs/testing.md: testing strategy overview for all workspaces

Smoke tests included

  • GET / — hello message
  • POST /rpc/planet/list — 8 planets via oRPC
  • Todos CRUD — D1 create + list

Reference

Based on MizuFinancial/affiliate testing approach using @cloudflare/vitest-pool-workers for real Workers runtime tests instead of mocking cloudflare:workers.

Test plan

  • pnpm test — 3 tests passed
  • pnpm test:e2e — requires running dev server

@nshen nshen changed the base branch from main to dev April 7, 2026 04:41
@nshen nshen force-pushed the feat/testing-framework branch 2 times, most recently from 94d1993 to 1cfd7d9 Compare April 7, 2026 04:48
Set up the foundational testing infrastructure for the monorepo:

- apps/server: Vitest + @cloudflare/vitest-pool-workers (v0.14) for
  integration tests running in real miniflare Workers runtime with D1/KV
- apps/web: Playwright for E2E tests against dev server
- docs/testing.md: testing strategy overview for all workspaces

Includes smoke tests verifying Hono routes, oRPC planet API, and
D1 CRUD operations (todos create + list).
@nshen nshen force-pushed the feat/testing-framework branch from 1cfd7d9 to 273e50e Compare April 7, 2026 04:52
- Initialize Playwright Test Agents with agent definitions in
  .claude/agents/ for Claude Code discovery
- Add playwright-test MCP server to .mcp.json with --config pointing
  to apps/web/playwright.config.ts
- Add seed.spec.ts and specs/ directory for test plans
- Update docs/testing.md with agent workflow documentation
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