mirror of
https://github.com/MeshCore-Beacon/beacon-web.git
synced 2026-10-18 13:19:52 +00:00
17 lines
707 B
TypeScript
17 lines
707 B
TypeScript
import { expect, it, vi } from "vitest";
|
|
import i18n from "../../../src/i18n";
|
|
|
|
vi.mock("maplibre-gl", () => ({}));
|
|
vi.mock("../../../src/features/map/maplibre-worker", () => ({}));
|
|
|
|
const { mapLocale } = await import("../../../src/features/map/useMapLibre");
|
|
|
|
it("keeps MapLibre's own English control tooltips", () => {
|
|
expect(mapLocale()).toMatchObject({ "NavigationControl.ZoomIn": "Zoom in", "AttributionControl.ToggleAttribution": "Toggle attribution" });
|
|
});
|
|
|
|
it("translates the MapLibre control tooltips to French", async () => {
|
|
await i18n.changeLanguage("fr");
|
|
expect(mapLocale()).toMatchObject({ "NavigationControl.ZoomIn": "Zoom avant", "NavigationControl.ZoomOut": "Zoom arrière" });
|
|
});
|