From a261b39c10577ae77ec5858f20425de9aa6f644a Mon Sep 17 00:00:00 2001 From: Cindy Green Date: Wed, 8 Jan 2025 12:35:29 -0500 Subject: [PATCH] Adds type for test. --- src/renderer/src/components/InviteListener.test.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/renderer/src/components/InviteListener.test.tsx b/src/renderer/src/components/InviteListener.test.tsx index f2769ed..f5ae335 100644 --- a/src/renderer/src/components/InviteListener.test.tsx +++ b/src/renderer/src/components/InviteListener.test.tsx @@ -1,6 +1,7 @@ import React from 'react' import { ClientApiProvider } from '@comapeo/core-react' -import type { invite as Invite, MapeoClientApi } from '@comapeo/ipc' +import type { Invite } from '@comapeo/core/dist/invite-api' +import { createMapeoClient } from '@comapeo/ipc' import { QueryClient, QueryClientProvider } from '@tanstack/react-query' import { RouterProvider, @@ -17,6 +18,8 @@ type InviteEventHandler = (invite: Invite) => void let inviteReceivedHandler: ((invite: InviteEventHandler) => void) | undefined +export type MapeoClientApi = ReturnType + const mockInvite = { addListener: vi.fn( (event: string, handler: (invite: InviteEventHandler) => void) => {