From 868fe641d57c837f28868dd1e350e42bfb144365 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rui=20Sim=C3=A3o?= Date: Fri, 15 Nov 2024 16:41:15 +0000 Subject: [PATCH] fix: tests --- .../hooks/tests/useGatewayForm.test.ts | 2 +- apps/evm/src/test-utils/wrapper.tsx | 29 ++++++++++++++----- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/apps/evm/src/app/[lang]/(bridge)/hooks/tests/useGatewayForm.test.ts b/apps/evm/src/app/[lang]/(bridge)/hooks/tests/useGatewayForm.test.ts index 2fac5d24..048817e5 100644 --- a/apps/evm/src/app/[lang]/(bridge)/hooks/tests/useGatewayForm.test.ts +++ b/apps/evm/src/app/[lang]/(bridge)/hooks/tests/useGatewayForm.test.ts @@ -22,7 +22,7 @@ vi.mock(import('@/hooks'), async (importOriginal) => { return { ...actual, - useAccount: vi.fn() + useBtcAccount: vi.fn() }; }); diff --git a/apps/evm/src/test-utils/wrapper.tsx b/apps/evm/src/test-utils/wrapper.tsx index d733392f..2e0b231d 100644 --- a/apps/evm/src/test-utils/wrapper.tsx +++ b/apps/evm/src/test-utils/wrapper.tsx @@ -1,20 +1,35 @@ import { QueryClient, QueryClientProvider } from '@gobob/react-query'; import { BOBUIProvider } from '@gobob/ui'; -import { WagmiProvider } from '@gobob/wagmi'; +import { WagmiProvider } from 'wagmi'; import { PropsWithChildren } from 'react'; +import { getConfig } from '@gobob/wagmi'; +import { DynamicWagmiConnector } from '@dynamic-labs/wagmi-connector'; +import { DynamicContextProvider } from '@dynamic-labs/sdk-react-core'; +import { BitcoinWalletConnectors } from '@dynamic-labs/bitcoin'; +import { EthereumWalletConnectors } from '@dynamic-labs/ethereum'; +import { isProd } from '@/constants'; import { LinguiClientProvider } from '@/i18n/provider'; export const wrapper = ({ children }: PropsWithChildren) => { const queryClient = new QueryClient(); return ( - - - - {children} + + + + + + {children} + + - - + + ); };