Skip to content

Commit c2b435d

Browse files
authored
test(react-query): add test case for infiniteQueryOptions (TanStack#8268)
1 parent 6c9e3f3 commit c2b435d

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)