import { describe, expect, test } from "bun:test" import { pluralCategory } from "./i18n" describe("pluralCategory", () => { test.each([ ["en", 0, "other"], ["en", 1, "one"], ["fr", 0, "one"], ["fr", 1_000_000, "many"], ["ru", 1, "one"], ["ru", 2, "few"], ["ru", 5, "many"], ["ru", 21, "one"], ["ar", 0, "zero"], ["ar", 1, "one"], ["ar", 2, "two"], ["ar", 3, "few"], ["ar", 11, "many"], ["ar", 100, "other"], ["ja", 1, "other"], ] as const)("selects %s for %d as %s", (locale, count, expected) => { expect(pluralCategory(locale, count)).toBe(expected) }) })