test(i18n): fix broken tests missing translation messages
This commit is contained in:
parent
a941565528
commit
35273f525d
10 changed files with 35 additions and 65 deletions
|
|
@ -2,8 +2,8 @@ import I18n, { type I18nOptions } from "@websnacksjs/i18n";
|
|||
|
||||
export type Fixtures = {
|
||||
base: {
|
||||
common: typeof import("./fixtures/base/messages/en/common.json");
|
||||
drama: typeof import("./fixtures/base/messages/en/drama.json");
|
||||
common: typeof import("./fixtures/base/en/common.json");
|
||||
drama: typeof import("./fixtures/base/en/drama.json");
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -17,7 +17,7 @@ export const withFixture = <F extends keyof Fixtures>(
|
|||
supportedLocales: ["en", "fr", "fr-Arab"],
|
||||
namespaces: ["drama"],
|
||||
messagesUrlTemplate: new URL(
|
||||
"./fixtures/base/messages/:locale/:namespace.json",
|
||||
"./fixtures/base/:locale/:namespace.json",
|
||||
import.meta.url,
|
||||
),
|
||||
...(overrides as Partial<I18nOptions<Fixtures["base"]>>),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue