chore: migrate from Vitest to Bun test runner and enhance AGENTS.md#438
Conversation
- Migrate all test files from Vitest to Bun's native test runner - vi.fn() -> mock.fn() - vi.spyOn() -> spyOn() from bun:test - vi.mock() -> mock.module() - Remove vitest dependencies and config files - Update turbo.json with test pipeline - Fix packages without tests (biome, cli) to exit 0 - Enhance AGENTS.md with hierarchical documentation - Root AGENTS.md: comprehensive monorepo guide with Bun testing - packages/hydrogen/AGENTS.md: Hydrogen-specific patterns - packages/schema/AGENTS.md: Schema package specifics - packages/react/AGENTS.md: React bindings documentation - Add Core Testing Directive (80/20 rule, AAA, FIRST, TDD) All 161 tests pass across 4 packages.
|
|
Claude finished @paul-phan's task in 2m 9s —— View job Code Review SummaryOverall: This is a well-executed migration from Vitest to Bun's native test runner with comprehensive documentation enhancements. The changes are clean, thorough, and ready to merge. All 161 tests pass, and the hierarchical AGENTS.md structure provides excellent package-specific guidance. IssuesNo blocking issues found. The migration is complete and correct. Suggestions💬 [packages/i18n/tests/client.test.ts:94-99] — Test coverage reduced
💬 [CLAUDE.md:1-29] — CLAUDE.md now a thin shim What's Good
Agent Fix PromptsNo fix prompts needed — all issues are minor suggestions. |
…ck.fn(), consolidate CLAUDE.md - Fix Quick Reference: bun x vitest run -> bun test - Fix Tooling section: Vitest -> Bun native test runner - Replace no-op arrow functions with mock.fn() in hydrogen test cache mock - Consolidate CLAUDE.md to reference AGENTS.md as single source of truth
Summary
This PR combines two major improvements:
1. Vitest → Bun Test Runner Migration
Migrated all test files from Vitest to Bun's native test runner:
vi.fn()→mock.fn()vi.spyOn()→spyOn()frombun:testvi.mock()→mock.module()vitest.config.ts,vitest.workspace.ts,packages/react/vitest.config.ts)turbo.jsonwith test pipelineAll 161 tests pass across 4 packages:
2. Enhanced AGENTS.md Documentation
Created hierarchical AGENTS.md structure:
Added Core Testing Directive with:
Test plan
bun run test— all 161 tests passbun run typecheck— 4 packages, all passbun run biome— 64 files, no errors