🧪 [testing improvement description] Implement unit tests for useAuthStore and fix linting.
🎯 **What:** This PR adds comprehensive unit tests for the `useAuthStore` Zustand store and resolves a CI linting failure by downgrading ESLint to version 9. 📊 **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 and restored CI health. The store implementation was also refined to properly include and handle the `token` property. Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
"@types/node": "^20",
|
||||
"@types/react": "^19",
|
||||
"@types/react-dom": "^19",
|
||||
"eslint": "^10",
|
||||
"eslint": "^9",
|
||||
"eslint-config-next": "16.1.7",
|
||||
"tailwindcss": "^4",
|
||||
"typescript": "^5"
|
||||
|
||||
Reference in New Issue
Block a user