Files
gh-christianlouis-inboxconv…/frontend/src
google-labs-jules[bot] 4515042acf 🧪 [testing improvement description] Implement unit tests for useAuthStore and refine store logic.
🎯 **What:** This PR adds comprehensive unit tests for the `useAuthStore` Zustand store in the frontend. It addresses a gap where no unit tests were present for authentication state management.
📊 **Coverage:** The new tests cover:
- Initial state verification.
- User state updates via `setUser`.
- Token management via `setToken`.
- Loading state toggles with `setLoading`.
- Complete logout flow, including `localStorage` cleanup.
 **Result:** Increased reliability of the authentication logic by ensuring state changes are deterministic and correctly persist/clear tokens as needed. The store implementation was also refined to properly include and handle the `token` property.

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-23 14:36:44 +00:00
..