This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
|
||||
import { postsKeys, tagsKeys, wikiKeys } from '@/lib/queryKeys'
|
||||
|
||||
describe ('query keys', () => {
|
||||
it ('uses stable namespaces for posts, tags, and wiki', () => {
|
||||
expect (postsKeys.show ('3')).toEqual (['posts', '3'])
|
||||
expect (postsKeys.related ('3')).toEqual (['related', '3'])
|
||||
expect (tagsKeys.deerjikists ('7')).toEqual (['tags', 'deerjikists', '7'])
|
||||
expect (wikiKeys.show ('Title', { version: '2' })).toEqual (
|
||||
['wiki', 'Title', { version: '2' }],
|
||||
)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user