import { renderHook } from "@testing-library/react";
import { expect, describe, it } from "vitest";
import { translations } from "~/localization/translation-packs/scores";
import { wrapper, frWrapper } from "~/test/utils";
import useTranslator from ".";

describe("useTranslator", () => {
  it("should add translations for a given translation-pack", () => {
    const { result } = renderHook(() => useTranslator([translations]), {
      wrapper,
    });

    expect(result.current.translations.cafes).toBe("Cafes");
  });

  it("should have translations for french", () => {
    const { result } = renderHook(() => useTranslator([translations]), {
      wrapper: frWrapper,
    });

    expect(result.current.translations.cafes).toBe("Cafés");
  });
});
