From 2a7d454a49cc1aca42a50f8671fa5d5bdc332f83 Mon Sep 17 00:00:00 2001 From: Kodai Nakamura Date: Thu, 4 Dec 2025 22:33:59 +0900 Subject: [PATCH] chore: add test for ignoreCase alias handling --- .../__tests__/replace-links.alias.test.ts | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/replace-links/__tests__/replace-links.alias.test.ts b/src/replace-links/__tests__/replace-links.alias.test.ts index abdfc12..47da819 100644 --- a/src/replace-links/__tests__/replace-links.alias.test.ts +++ b/src/replace-links/__tests__/replace-links.alias.test.ts @@ -183,4 +183,27 @@ describe("replaceLinks - alias handling", () => { expect(result).toBe("[[set/HelloWorld|HW]]"); }); }); + + it("Aliases with ignoreCase: true", () => { + const { candidateMap, trie } = buildCandidateTrieForTest({ + files: [{ path: "pages/ティーチング", aliases: ["Teaching"] }], + settings: { + restrictNamespace: false, + baseDir: "pages", + }, + }); + const result = replaceLinks({ + body: "Teaching", + linkResolverContext: { + filePath: "pages/Teaching", + trie, + candidateMap, + }, + settings: { + baseDir: "pages", + ignoreCase: true, + }, + }); + expect(result).toBe("[[ティーチング|Teaching]]"); + }); });