aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/test-utils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-webextension/src/test-utils.ts')
-rw-r--r--packages/taler-wallet-webextension/src/test-utils.ts11
1 files changed, 8 insertions, 3 deletions
diff --git a/packages/taler-wallet-webextension/src/test-utils.ts b/packages/taler-wallet-webextension/src/test-utils.ts
index 085055a7e..d85d992b1 100644
--- a/packages/taler-wallet-webextension/src/test-utils.ts
+++ b/packages/taler-wallet-webextension/src/test-utils.ts
@@ -25,17 +25,18 @@ import {
ComponentChildren,
Fragment,
FunctionalComponent,
+ VNode,
h as create,
options,
render as renderIntoDom,
- 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";
+import { TranslationProvider } from "@gnu-taler/web-util/lib/index.browser";
+import { strings } from "./i18n/strings.js";
// When doing tests we want the requestAnimationFrame to be as fast as possible.
// without this option the RAF will timeout after 100ms making the tests slower
@@ -368,7 +369,11 @@ export function createWalletApiMock(): {
}): VNode {
let children = _cs;
children = create(AlertProvider, { children }, children);
- children = create(TranslationProvider, { children }, children);
+ children = create(
+ TranslationProvider,
+ { children, source: strings, initial: "en", forceLang: "en" },
+ children,
+ );
return create(
BackendProvider,
{