Slug joiner normalization

This commit is contained in:
2026-05-21 22:06:52 +02:00
parent 96afb64c7a
commit 43fee721db
5 changed files with 84 additions and 33 deletions
+15
View File
@@ -168,6 +168,21 @@ func TestMatchExistingNodeBBPagePrefersGeneratedPublicSlug(t *testing.T) {
}
}
func TestDeploySlugifyWikiTitleMatchesGeneratedSlugPolicy(t *testing.T) {
tests := map[string]string{
`Grandmaster's Battle Momentum`: "grandmasters-battle-momentum",
`Bigbys Clenched Fist`: "bigbys-clenched-fist",
`Hardiness vs. Enchantments`: "hardiness-vs-enchantments",
`Clairaudience/Clairvoyance`: "clairaudience-clairvoyance",
`Élite & Noble Houses`: "elite-noble-houses",
}
for input, want := range tests {
if got := slugifyWikiTitle(input); got != want {
t.Fatalf("slugifyWikiTitle(%q) = %q, want %q", input, got, want)
}
}
}
func TestDeployWikiCreatesNodeBBTopicAndWritesManifest(t *testing.T) {
root := t.TempDir()
sourceDir := filepath.Join(root, "pages")