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

infiniteQueryOptions.test.ts

16 lines530 Bytes

1import { describe, expect, it } from 'vitest'
2import { queryKey } from '@tanstack/query-test-utils'
3import { infiniteQueryOptions } from '../infiniteQueryOptions'
4​
5describe('infiniteQueryOptions', () => {
6 it('should return the object received as a parameter without any modification.', () => {
7 const object = {
8 queryKey: queryKey(),
9 queryFn: () => Promise.resolve(5),
10 getNextPageParam: () => null,
11 initialPageParam: null,
12 } as const
13​
14 expect(infiniteQueryOptions(object)).toBe(object)
15 })
16})