Skip to content
Source
Sign inSign up
TanStack/query
Open History to see the last commit

infiniteQueryOptions.test.tsx

17 lines546 Bytes

1import { describe, expect, it } from 'vitest'
2​
3import { infiniteQueryOptions } from '../infiniteQueryOptions'
4import type { UseInfiniteQueryOptions } from '../types'
5​
6describe('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)).toBe(object)
16 })
17})