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

queryKey.test.ts

12 lines337 Bytes

1import { describe, expect, it } from 'vitest'
2import { queryKey } from '../queryKey'
3​
4describe('queryKey', () => {
5 it('should return a query key', () => {
6 const key = queryKey()
7 expect(key).toEqual(['query_1'])
8 })
9 it('should return a new query key each time', () => {
10 expect(queryKey()).not.toEqual(queryKey())
11 })
12})