Slug joiner normalization
This commit is contained in:
@@ -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",
|
||||
`Bigby’s 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")
|
||||
|
||||
Reference in New Issue
Block a user