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

infinite-query-options.test.ts

17 lines563 Bytes

1import { describe, expect, it } from 'vitest'
2​
3import { infiniteQueryOptions } from '../infinite-query-options'
4import type { CreateInfiniteQueryOptions } from '../types'
5​
6describe('infiniteQueryOptions', () => {
7 it('should return the object received as a parameter without any modification.', () => {
8 const object: CreateInfiniteQueryOptions = {
9 queryKey: ['key'],
10 queryFn: () => Promise.resolve(5),
11 getNextPageParam: () => null,
12 initialPageParam: null,
13 }
14​
15 expect(infiniteQueryOptions(object)).toStrictEqual(object)
16 })
17})