File size: 490 Bytes
5242e6a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import { describe, expect, it } from 'vitest'

import { queryClient } from '@/lib/queryClient'

describe('queryClient', () => {
  it('is a QueryClient singleton', async () => {
    const mod = await import('@/lib/queryClient')
    expect(mod.queryClient).toBe(queryClient)
  })

  it('getQueryCache/mutationCache are available', () => {
    expect(typeof queryClient.getQueryCache().getAll).toBe('function')
    expect(typeof queryClient.getMutationCache().getAll).toBe('function')
  })
})