# Testing Guide ## Overview This project uses two testing frameworks: - **Vitest** for unit and integration tests (src/__tests__) - **Playwright** for end-to-end tests (tests/e2e/) ## Running Tests ### Unit/Integration Tests (Vitest) ```bash # Run all unit tests npm run test # Run tests in watch mode (auto-rerun on changes) npm test # Run tests with coverage report npm run test:coverage # Run tests with UI (interactive mode) npm run test:ui ``` ### End-to-End Tests (Playwright) ```bash # Run all E2E tests npm run test:e2e # Run E2E tests with UI npm run test:e2e:ui # Run E2E tests in headed mode (see browser) npm run test:e2e:headed ``` ## App Tenant Validation Tests Location: `src/__tests__/App.tenant.test.tsx` Tests the critical subdomain-based tenant validation logic. Run with: ```bash npm test -- App.tenant ``` See `src/__tests__/README.md` for detailed testing documentation.