Skip to content

Commit 6c9e3f3

Browse files
authored
test(react-query): add test case for queryOptions (TanStack#8267)
* test(react-query): add test case for queryOptions * chore: update
1 parent aa6d3f8 commit 6c9e3f3

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { describe, expect, it } from 'vitest'
2+
import { queryOptions } from '../queryOptions'
3+
import type { UseQueryOptions } from '../types'
4+
5+
describe('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)).toStrictEqual(object)
13+
})
14+
})

0 commit comments

Comments
 (0)