914 B
914 B
paths
| paths | |||||
|---|---|---|---|---|---|
|
Testing
- Unit/integration: Vitest + React Testing Library — files named
*.test.tsor*.test.tsx - E2E: Playwright — files in
src/e2e/, hithttps://next-postgres-shadcn.ruska.dev - Test behavior, not implementation — avoid testing internal state or private methods
- Use
screen.getByRoleovergetByTestId— tests should mirror how users interact - Mock external dependencies (APIs, third-party services), not internal modules
- Each test file should be self-contained — no shared mutable state between tests
- Run
npm testfor Vitest,npm run test:e2efor Playwright passWithNoTests: trueis set in vitest config — CI won't fail on missing tests