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