Developer Experience
Testing
Jest setup and test commands.
Overview
NextBento uses Jest for unit and integration tests.
Commands
| Command | Description |
|---|---|
pnpm test | Run all tests |
pnpm test:watch | Run tests in watch mode |
pnpm test:coverage | Run with coverage report |
Configuration
jest.config.js — Jest config (transform, module paths, test match patterns).
Test Location
Tests live in __tests__/ or colocated with source (e.g. *.test.ts next to the module). Check jest.config.js for the configured testMatch pattern.
Writing Tests
- Use
describeanditfor structure - Mock external services (Supabase, Stripe, Resend) in tests
- Use
@testing-library/reactfor component tests if installed