Open History to see the last commit
1import { describe, expect, it } from 'vitest'
2import { queryKey } from '@tanstack/query-test-utils'
3β
4import { infiniteQueryOptions } from '../infinite-query-options'
5import type { CreateInfiniteQueryOptions } from '../types'
6β
7describe('infiniteQueryOptions', () => {
8 it('should return the object received as a parameter without any modification.', () => {
9 const key = queryKey()
10 const object: CreateInfiniteQueryOptions = {
11 queryKey: key,
12 queryFn: () => Promise.resolve(5),
13 getNextPageParam: () => null,
14 initialPageParam: null,
15 }
16β
17 expect(infiniteQueryOptions(object)).toBe(object)
18 })
19})