( overrides: Record<string, unknown> )
| 41 | * The mock returns a partial UseQueryResult: only the fields |
| 42 | * ProtectedRoute reads. Every test case has to include `error`, |
| 43 | * `isFetching`, and `refetch` so the destructure in the component |
| 44 | * doesn't see `undefined` and confuse `resolveAuthStatus`. |
| 45 | */ |
| 46 | const baseMe = ( |
| 47 | overrides: Record<string, unknown> |
| 48 | ): Record<string, unknown> => ({ |
| 49 | data: undefined, |
| 50 | error: null, |
| 51 | isPending: false, |
| 52 | isFetching: false, |
| 53 | refetch: vi.fn(), |
| 54 | ...overrides |
| 55 | }); |
no outgoing calls
no test coverage detected