Task
Write comprehensive test cases for the ThemeToggle component located at src/components/layout/ThemeToggle/ThemeToggle.tsx using Vitest and React Testing Library.
Requirements
- Test rendering of ThemeToggle component
- Validate theme switch behavior (toggle between sun and moon icons)
- Ensure DaisyUI classes (
swap, swap-rotate, theme-controller) are applied correctly
- Confirm accessibility for the switch
- Cover all functional and edge cases
Guidelines
- Follow project TDD standards and preferred test structure
- Place the test file as
ThemeToggle.test.tsx in the same directory as the component
- Use semantic queries (
getByRole, etc.) and AAA pattern
- Reference the main component source code
Assignee
@KARUNANS2004 will be responsible for implementing these tests.