From 743d83a5eb90a74a4b663130cf2bd9131719e958 Mon Sep 17 00:00:00 2001 From: Santino Fuentes Date: Sat, 28 Nov 2026 11:52:45 -0600 Subject: [PATCH] test(copy): check every TaintSource kind has taintFrom copy in both locales Signed-off-by: Santino Fuentes --- packages/copy/test/copy.test.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/packages/copy/test/copy.test.ts b/packages/copy/test/copy.test.ts index 4a9c55f..07dcbdc 100644 --- a/packages/copy/test/copy.test.ts +++ b/packages/copy/test/copy.test.ts @@ -27,6 +27,20 @@ describe("locale files (CT-10)", () => { } }); + test("every TaintSource kind has HM-APPR-01.taintFrom copy in both locales", () => { + const types = readFileSync(new URL("../../core/src/types.ts", import.meta.url), "utf8"); + const kinds = /interface TaintSource \{\s*kind: ([^;]+);/ + .exec(types)![1]! + .split("|") + .map((k) => k.trim().replace(/"/g, "")); + expect(kinds.length).toBeGreaterThanOrEqual(6); + for (const kind of kinds) { + const key = `HM-APPR-01.taintFrom.${kind}`; + expect(en[key], key).toBeTruthy(); + expect(es[key], key).toBeTruthy(); + } + }); + test("no em or en dashes in copy (house style)", () => { for (const [k, v] of [...Object.entries(en), ...Object.entries(es)]) expect(v, k).not.toMatch(/[–—]/); });