import assert from "node:assert/strict"; import test from "node:test"; import { isWoman, vocative } from "../index"; import { AUTOMATED_CASES, EXPLICIT_CASES } from "./test-data"; test("isWoman matches curated gender expectations", () => { for (const testCase of AUTOMATED_CASES) { assert.equal( isWoman(testCase.name), testCase.isWoman, `Unexpected gender detection for ${testCase.name}`, ); } }); test("vocative matches curated outputs", () => { for (const testCase of AUTOMATED_CASES) { assert.equal( vocative(testCase.name), testCase.vocative, `Unexpected vocative for ${testCase.name}`, ); } }); test("vocative respects explicit branch arguments", () => { for (const testCase of EXPLICIT_CASES) { assert.equal( vocative(testCase.name, ...testCase.args), testCase.expected, `Unexpected result for ${testCase.label}`, ); } });