Description
Most UI components lack test coverage. We need unit tests for the most commonly used shared components to prevent regressions during refactoring.
Goals
- Set up Vitest as the test runner (it's already in devDependencies)
- Configure @testing-library/react with Vitest
- Write tests for 8+ shared components:
- components/ui/button.tsx
- components/ui/dialog.tsx
- components/ui/dropdown-menu.tsx
- components/ui/tabs.tsx
- components/ui/alert.tsx
- components/ui/badge.tsx
- components/ui/toast.tsx
- components/ui/skeleton.tsx
- Test rendering, user interactions, accessibility attributes
- Add test to workflow (CI)
Files
__tests__/components/ui/button.test.tsx (new)
__tests__/components/ui/dialog.test.tsx (new)
__tests__/components/ui/dropdown-menu.test.tsx (new)
__tests__/components/ui/tabs.test.tsx (new)
vitest.config.ts (new, if not existing)
Description
Most UI components lack test coverage. We need unit tests for the most commonly used shared components to prevent regressions during refactoring.
Goals
Files
__tests__/components/ui/button.test.tsx(new)__tests__/components/ui/dialog.test.tsx(new)__tests__/components/ui/dropdown-menu.test.tsx(new)__tests__/components/ui/tabs.test.tsx(new)vitest.config.ts(new, if not existing)