()
| 39 | let succeed = false |
| 40 | |
| 41 | function Page() { |
| 42 | const { data } = useQuery({ |
| 43 | queryKey: key, |
| 44 | queryFn: () => |
| 45 | sleep(10).then(() => { |
| 46 | if (!succeed) throw new Error('Error') |
| 47 | return 'data' |
| 48 | }), |
| 49 | retry: false, |
| 50 | throwOnError: true, |
| 51 | }) |
| 52 | |
| 53 | return <div>{data}</div> |
| 54 | } |
| 55 | |
| 56 | const rendered = renderWithClient( |
| 57 | queryClient, |
nothing calls this directly
no test coverage detected