Create

Testing tools

Master can write unit, integration, and e2e tests. It runs them itself and suggests fixes if they fail.

Overview

Tests are part of the workflow — not an afterthought after implementation.

Test types

  • Unit — Vitest, Jest for individual functions and components
  • Integration — testing API, DB queries, edge functions
  • E2E — Playwright / browser testing

Prompt examples

prompt
Write unit tests for the useCart hook — test add, remove, clear, and total price.
prompt
Run all tests and if anything fails, fix it.
prompt
Coverage for src/lib/credits.ts must be 90%+. Add missing cases.