MCPcopy Index your code
hub / github.com/TanStack/query / getAppMock

Function getAppMock

packages/vue-query/src/__tests__/vueQueryPlugin.test.ts:28–43  ·  view source on GitHub ↗
(withUnmountHook = false)

Source from the content-addressed store, hash-verified

26const testIf = (condition: boolean) => (condition ? test : test.skip)
27
28function getAppMock(withUnmountHook = false): TestApp {
29 const mock = {
30 provide: vi.fn(),
31 unmount: vi.fn(),
32 onUnmount: withUnmountHook
33 ? vi.fn((u: UnmountCallback) => {
34 mock._unmount = u
35 })
36 : undefined,
37 mixin: (m: ComponentOptions) => {
38 mock._mixin = m
39 },
40 } as unknown as TestApp
41
42 return mock
43}
44
45describe('VueQueryPlugin', () => {
46 beforeEach(() => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…