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

queryOptions.test.tsx

15 lines441 Bytes

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