Documentation

Guides and references

Developer Experience

Testing

Jest setup and test commands.

Overview

NextBento uses Jest for unit and integration tests.

Commands

CommandDescription
pnpm testRun all tests
pnpm test:watchRun tests in watch mode
pnpm test:coverageRun 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 describe and it for structure
  • Mock external services (Supabase, Stripe, Resend) in tests
  • Use @testing-library/react for component tests if installed