test(@websnacksjs/i18n): fix broken tests missing translation messages (#5)
This commit is contained in:
parent
2867c2f875
commit
d6696a150b
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