We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c9e3f3 commit c2b435dCopy full SHA for c2b435d
packages/react-query/src/__tests__/infiniteQueryOptions.test.tsx
@@ -0,0 +1,17 @@
1
+import { describe, expect, it } from 'vitest'
2
+
3
+import { infiniteQueryOptions } from '../infiniteQueryOptions'
4
+import type { UseInfiniteQueryOptions } from '../types'
5
6
+describe('infiniteQueryOptions', () => {
7
+ it('should return the object received as a parameter without any modification.', () => {
8
+ const object: UseInfiniteQueryOptions = {
9
+ queryKey: ['key'],
10
+ queryFn: () => Promise.resolve(5),
11
+ getNextPageParam: () => null,
12
+ initialPageParam: null,
13
+ }
14
15
+ expect(infiniteQueryOptions(object)).toStrictEqual(object)
16
+ })
17
+})
0 commit comments