Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
manudeli committed Jul 14, 2024
1 parent c498eca commit 155a42f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/solid-query/src/__tests__/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { onlineManager } from '@tanstack/query-core'
import { QueryClient } from '../QueryClient'
import type { QueryClientConfig } from '..'
import type { ParentProps } from 'solid-js'
import type { SpyInstance } from 'vitest'
import type { MockInstance } from 'vitest'

let queryKeyCount = 0
export function queryKey() {
Expand Down Expand Up @@ -38,13 +38,13 @@ export function createQueryClient(config?: QueryClientConfig): QueryClient {

export function mockVisibilityState(
value: DocumentVisibilityState,
): SpyInstance<[], DocumentVisibilityState> {
): MockInstance<() => DocumentVisibilityState> {
return vi.spyOn(document, 'visibilityState', 'get').mockReturnValue(value)
}

export function mockOnlineManagerIsOnline(
value: boolean,
): SpyInstance<[], boolean> {
): MockInstance<() => boolean> {
return vi.spyOn(onlineManager, 'isOnline').mockReturnValue(value)
}

Expand Down

0 comments on commit 155a42f

Please sign in to comment.