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

infiniteQueryOptions.svelte.test.ts

16 lines559 Bytes

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