import { describe, expect, it } from "vitest"; import vectors from "../../../crates/cotton-rules/vectors/visibility.json"; import { parseVisibility } from "../src/definitions.ts"; // RULE: a visibility word reads as the phone reads it — the shared vectors, // which cotton-core's visibility tests read too. describe("visibility words", () => { for (const c of vectors.cases as { word: string | null; want?: unknown; refused?: boolean }[]) { it(`${JSON.stringify(c.word)}`, () => { expect(parseVisibility(c.word)).toEqual(c.refused ? null : c.want); }); } });