What problem does it solve?
Provides a consistent, production-ready testing workflow to prevent hanging tests, inconsistent mocks, and low coverage by enforcing mandatory utilities, mock helpers, and testing conventions for a Next.js TypeScript codebase.
Core Features & Use Cases
- Mandatory utilities: Requires renderWithTheme, renderWithProviders, testFactories, and mock-helpers to avoid ad-hoc wrappers and brittle tests.
- Mocking patterns: Standardizes Next.js, next-auth, next-intl, and database mocks using module-level vi.fn() patterns and createMockSelectQuery/createMockInsertQuery helpers.
- Test types covered: Component rendering, context-aware components, unit tests for utilities, repository/db mocking, and integration tests for database interactions.
- Workflow optimizations: Parallel subagent test creation guidance for generating multiple test files in one coordinated invocation and explicit coverage targets (80%+ for new code).
Quick Start
Create Vitest tests for a target file using testFactories, mock-helpers, and renderWithTheme or renderWithProviders while aiming for 80% coverage.