Add tests for useAuth hooks and AuthGuard component; Update .gitignore

- Implemented comprehensive tests for `useAuth` hooks (`useIsAuthenticated`, `useCurrentUser`, and `useIsAdmin`) with mock states and coverage for edge cases.
- Added tests for `AuthGuard` to validate route protection, admin access control, loading states, and use of fallback components.
- Updated `.gitignore` to exclude `coverage.json`.
This commit is contained in:
Felipe Cardoso
2025-11-01 01:31:22 +01:00
parent 9ae89a20b3
commit 819f3ba963
3 changed files with 582 additions and 0 deletions

1
.gitignore vendored
View File

@@ -174,6 +174,7 @@ htmlcov/
.nox/
.coverage
.coverage.*
coverage.json
.cache
nosetests.xml
coverage.xml