diff options
Diffstat (limited to 'packages/taler-wallet-webextension/src/test-utils.ts')
-rw-r--r-- | packages/taler-wallet-webextension/src/test-utils.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/taler-wallet-webextension/src/test-utils.ts b/packages/taler-wallet-webextension/src/test-utils.ts index 7e7ddd88d..085055a7e 100644 --- a/packages/taler-wallet-webextension/src/test-utils.ts +++ b/packages/taler-wallet-webextension/src/test-utils.ts @@ -31,8 +31,10 @@ import { VNode, } from "preact"; import { render as renderToString } from "preact-render-to-string"; +import { AlertProvider } from "./context/alert.js"; import { BackendProvider } from "./context/backend.js"; import { TranslationProvider } from "./context/translation.js"; +import { nullFunction } from "./mui/handlers.js"; import { BackgroundApiClient, wxApi } from "./wxApi.js"; // When doing tests we want the requestAnimationFrame to be as fast as possible. @@ -218,7 +220,7 @@ export function mountHook<T extends object>( }; } -export const nullFunction: any = () => null; +// export const nullFunction: any = () => null; interface MockHandler { addWalletCallResponse<Op extends WalletCoreOpKeys>( @@ -365,6 +367,7 @@ export function createWalletApiMock(): { children: ComponentChildren; }): VNode { let children = _cs; + children = create(AlertProvider, { children }, children); children = create(TranslationProvider, { children }, children); return create( BackendProvider, |