Skip to content

Commit 815ff24

Browse files
authored
test(react-query): resolve ESLint typescript-eslint/require-await warnings (#8905)
1 parent 4117d68 commit 815ff24

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

packages/react-query/src/__tests__/QueryResetErrorBoundary.test.tsx

+2-4
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,7 @@ describe('QueryErrorResetBoundary', () => {
216216
function Page() {
217217
const { data, refetch, status, fetchStatus } = useQuery<string>({
218218
queryKey: key,
219-
queryFn: async () => {
220-
throw new Error('Error')
221-
},
219+
queryFn: () => Promise.reject(new Error('Error')),
222220
retry: false,
223221
enabled: false,
224222
throwOnError: true,
@@ -578,7 +576,7 @@ describe('QueryErrorResetBoundary', () => {
578576
consoleMock.mockRestore()
579577
})
580578

581-
it('should render children', async () => {
579+
it('should render children', () => {
582580
const consoleMock = vi
583581
.spyOn(console, 'error')
584582
.mockImplementation(() => undefined)

0 commit comments

Comments
 (0)