diff --git a/packages/vue-urql/src/useMutation.test.ts b/packages/vue-urql/src/useMutation.test.ts index f7d29b2f52..991bf7fdec 100644 --- a/packages/vue-urql/src/useMutation.test.ts +++ b/packages/vue-urql/src/useMutation.test.ts @@ -1,3 +1,4 @@ +import { OperationResult, OperationResultSource } from '@urql/core'; import { reactive } from 'vue'; import { vi, expect, it, beforeEach, describe } from 'vitest'; @@ -25,7 +26,9 @@ describe('useMutation', () => { const subject = makeSubject(); const clientMutation = vi .spyOn(client, 'executeMutation') - .mockImplementation(() => subject.source); + .mockImplementation( + () => subject.source as OperationResultSource + ); const mutation = reactive( useMutation( diff --git a/packages/vue-urql/src/useQuery.test.ts b/packages/vue-urql/src/useQuery.test.ts index f3a878ebf9..6ac721cccf 100644 --- a/packages/vue-urql/src/useQuery.test.ts +++ b/packages/vue-urql/src/useQuery.test.ts @@ -1,3 +1,4 @@ +import { OperationResult, OperationResultSource } from '@urql/core'; import { nextTick, reactive, ref } from 'vue'; import { vi, expect, it, describe } from 'vitest'; @@ -18,7 +19,9 @@ describe('useQuery', () => { const subject = makeSubject(); const executeQuery = vi .spyOn(client, 'executeQuery') - .mockImplementation(() => subject.source); + .mockImplementation( + () => subject.source as OperationResultSource + ); const _query = useQuery({ query: `{ test }`, @@ -109,7 +112,9 @@ describe('useQuery', () => { const subject = makeSubject(); const executeQuery = vi .spyOn(client, 'executeQuery') - .mockImplementation(() => subject.source); + .mockImplementation( + () => subject.source as OperationResultSource + ); const _query = useQuery({ query: `{ test }`, diff --git a/packages/vue-urql/src/useSubscription.test.ts b/packages/vue-urql/src/useSubscription.test.ts index 3c8e3b31f6..3ab0e57cb5 100644 --- a/packages/vue-urql/src/useSubscription.test.ts +++ b/packages/vue-urql/src/useSubscription.test.ts @@ -1,3 +1,4 @@ +import { OperationResult, OperationResultSource } from '@urql/core'; import { nextTick, reactive, ref } from 'vue'; import { vi, expect, it, describe } from 'vitest'; @@ -18,7 +19,9 @@ describe('useSubscription', () => { const subject = makeSubject(); const executeQuery = vi .spyOn(client, 'executeSubscription') - .mockImplementation(() => subject.source); + .mockImplementation( + () => subject.source as OperationResultSource + ); const sub = reactive( useSubscription({ @@ -60,7 +63,9 @@ describe('useSubscription', () => { const subject = makeSubject(); const executeSubscription = vi .spyOn(client, 'executeSubscription') - .mockImplementation(() => subject.source); + .mockImplementation( + () => subject.source as OperationResultSource + ); const variables = ref({}); const sub = reactive( @@ -101,7 +106,9 @@ describe('useSubscription', () => { const subject = makeSubject(); const executeSubscription = vi .spyOn(client, 'executeSubscription') - .mockImplementation(() => subject.source); + .mockImplementation( + () => subject.source as OperationResultSource + ); const scanHandler = (currentState: any, nextState: any) => ({ counter: (currentState ? currentState.counter : 0) + nextState.counter,