ぼざクリタグ広場 https://hub.nizika.monster
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

15 lines
536 B

  1. import { describe, expect, it } from 'vitest'
  2. import { postsKeys, tagsKeys, wikiKeys } from '@/lib/queryKeys'
  3. describe ('query keys', () => {
  4. it ('uses stable namespaces for posts, tags, and wiki', () => {
  5. expect (postsKeys.show ('3')).toEqual (['posts', '3'])
  6. expect (postsKeys.related ('3')).toEqual (['related', '3'])
  7. expect (tagsKeys.deerjikists ('7')).toEqual (['tags', 'deerjikists', '7'])
  8. expect (wikiKeys.show ('Title', { version: '2' })).toEqual (
  9. ['wiki', 'Title', { version: '2' }],
  10. )
  11. })
  12. })