forked from baron/baron-sso
refactor(adminfront): rename legacy companyCode to tenantSlug across frontend (#426)
This commit is contained in:
@@ -8,15 +8,15 @@ describe("i18n utility", () => {
|
||||
});
|
||||
|
||||
it("returns fallback if key not found", () => {
|
||||
expect(t("non.existent.key", "Fallback")).toBe("Fallback");
|
||||
expect(t("this.key.truly.does.not.exist", "Fallback")).toBe("Fallback");
|
||||
});
|
||||
|
||||
it("returns key if fallback not provided and key not found", () => {
|
||||
expect(t("non.existent.key")).toBe("non.existent.key");
|
||||
expect(t("this.key.truly.does.not.exist")).toBe("this.key.truly.does.not.exist");
|
||||
});
|
||||
|
||||
it("replaces variables in template", () => {
|
||||
expect(t("test.key", "Hello {{ name }}", { name: "World" })).toBe(
|
||||
expect(t("this.test.key", "Hello {{ name }}", { name: "World" })).toBe(
|
||||
"Hello World",
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user