Open Issues Need Help
View All on GitHub UserDetailsPage Test Mocking Issue - Cannot Access Mocked Functions Before Initialization about 1 year ago
AI Summary: The `UserDetailsPage.test.tsx` file is failing due to a `ReferenceError` when trying to mock React Query hooks (`useAdminGetUser`, `useAdminGetPicksByUser`). The current mocking setup, which uses dynamic imports within `beforeEach`, creates a hoisting and circular dependency issue. The recommended solution is to refactor the test to use `vi.mock()` directly for the API hooks.
Complexity:
2/5
bug help wanted frontend testing
dhpollack/football-pool dhpollack/football-pool A vibe coding remake of an old web-based football pool
Open project →
1
A vibe coding remake of an old web-based football pool
TypeScript