Skip to content

Commit

Permalink
test(react-query): add test case for queryOptions (#8267)
Browse files Browse the repository at this point in the history
* test(react-query): add test case for queryOptions

* chore: update
  • Loading branch information
manudeli authored Nov 13, 2024
1 parent aa6d3f8 commit 6c9e3f3
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions packages/react-query/src/__tests__/queryOptions.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { describe, expect, it } from 'vitest'
import { queryOptions } from '../queryOptions'
import type { UseQueryOptions } from '../types'

describe('queryOptions', () => {
it('should return the object received as a parameter without any modification.', () => {
const object: UseQueryOptions = {
queryKey: ['key'],
queryFn: () => Promise.resolve(5),
} as const

expect(queryOptions(object)).toStrictEqual(object)
})
})

0 comments on commit 6c9e3f3

Please sign in to comment.