mirror of
https://github.com/kdnk/obsidian-automatic-linker.git
synced 2026-07-22 12:00:30 +00:00
chore: add test for ignoreCase alias handling
This commit is contained in:
parent
3a475010a0
commit
2a7d454a49
1 changed files with 23 additions and 0 deletions
|
|
@ -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]]");
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue