Open Issues Need Help
View All on GitHub UserDetailsPage Test Mocking Issue - Cannot Access Mocked Functions Before Initialization 3 months 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