import { describe, expect, it } from "vitest"; import { counted } from "./counted"; describe("counted", () => { it("uses the singular for exactly one", () => { expect(counted(1, "note", "notes")).toBe("1 note"); }); it("uses the plural for everything else, zero included", () => { expect(counted(0, "note", "notes")).toBe("0 notes"); expect(counted(3, "person", "people")).toBe("3 people"); }); });