From 1b10caed258359aa78fca7be41b585dac616564d Mon Sep 17 00:00:00 2001 From: Ash Date: Fri, 23 Oct 2026 15:02:14 +0530 Subject: [PATCH] test(conformance): guard Malayalam heading links against joiner loss Extend readmeConsistency.test.ts with a Malayalam case mirroring the existing Persian one, addressing the P2 review finding on #6383. The update heading's U+200C is written as an explicit escape so an editor cannot strip it invisibly; verified the test fails when the joiner is removed from README_ml.md. npm run test:local -- tests/conformance/readmeConsistency.test.ts passes 10/10. Supersedes #6383 (follow-up to #6731) Co-Authored-By: gensokyo-dev Co-Authored-By: Claude Opus 5.5 --- tests/conformance/readmeConsistency.test.ts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tests/conformance/readmeConsistency.test.ts b/tests/conformance/readmeConsistency.test.ts index 6a0219c6b7..8b0fb577fc 100644 --- a/tests/conformance/readmeConsistency.test.ts +++ b/tests/conformance/readmeConsistency.test.ts @@ -87,6 +87,27 @@ describe("onboarding documentation product facts", () => { ); } }); + + it("preserves zero-width non-joiners in Malayalam links to GitHub-rendered headings", async () => { + const malayalam = await readFile( + resolve("docs/readme/README_ml.md"), + "utf8", + ); + // Confirmed against GitHub's rendered README, which retains U+200C. The + // update heading keeps exactly one joiner between അപ and ഡേറ്റ്; an + // editor that drops it from the heading or the fragment must fail here. + const zeroWidthNonJoiner = "\u200c"; + for (const heading of [ + `REA അപ്${zeroWidthNonJoiner}ഡേറ്റ് ചെയ്യുക`, + "എന്തൊക്കെ വിശകലനം ചെയ്യാം", + "ഉദാഹരണങ്ങൾ", + ]) { + expect(malayalam).toContain(`## ${heading}`); + expect(malayalam).toContain( + `](#${heading.toLowerCase().replaceAll(" ", "-")})`, + ); + } + }); }); describe("published performance evidence", () => {