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

queryOptions.test.tsx

14 lines440 Bytes

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