This project supports reusable component tests with Vitest + Testing Library, including browser-based tests via Playwright.
setupTests.ts: includes @testing-library/jest-dom/vitest matchers.setupBrowserTests.ts: setup for browser-based testing.Used for most component tests and logic tests. It is extremely fast but does not represent a real browser environment.
Used for high-fidelity UI tests that require a real browser environment. This is essential for testing complex interactions, CSS layouts, and browser-specific APIs.
bun run test:component: Run component tests in the DOM environment.bun run test:browser: Run browser-based tests using Playwright.bun run test:ui: Launch Vitest UI for interactive testing.*.test.tsx.renderWithProviders for components that rely on context/providers.screen, userEvent).data-testid attributes only where semantic queries are impractical (e.g., repeated controls).Browser tests run in a real Chromium environment via Vitest Browser mode + Playwright.
*.browser.test.{ts,tsx}.bun run test:browser.Guidelines for browser tests:
data-testid for repeated or highly dynamic controls.