import { expect, test } from "vitest";
import { humanizeDuration } from "../humanizeDuration";

test("format duration for humans", () => {
  expect(humanizeDuration(1)).toBe("1 Minute");
  expect(humanizeDuration(15)).toBe("15 Minuten");
  expect(humanizeDuration(42)).toBe("45 Minuten");
  expect(humanizeDuration(60)).toBe("1 Stunde");
  expect(humanizeDuration(122)).toBe("2 Stunden");
  expect(humanizeDuration(120)).toBe("2 Stunden");
  expect(humanizeDuration(132)).toBe("2 Stunden 15 Minuten");
  expect(humanizeDuration(632)).toBe("10 Stunden");
});
