MCPcopy Create free account
hub / github.com/driangle/taskmd / TestNormalizeLabel

Function TestNormalizeLabel

apps/cli/internal/sync/mapper_test.go:179–202  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

177}
178
179func TestNormalizeLabel(t *testing.T) {
180 tests := []struct {
181 input string
182 expected string
183 }{
184 {"bug", "bug"},
185 {"Bug", "bug"},
186 {"Good First Issue", "good-first-issue"},
187 {"HELP WANTED", "help-wanted"},
188 {"in progress", "in-progress"},
189 {"already-hyphenated", "already-hyphenated"},
190 {"MiXeD CaSe Label", "mixed-case-label"},
191 {"", ""},
192 }
193
194 for _, tt := range tests {
195 t.Run(tt.input, func(t *testing.T) {
196 got := normalizeLabel(tt.input)
197 if got != tt.expected {
198 t.Errorf("normalizeLabel(%q) = %q, want %q", tt.input, got, tt.expected)
199 }
200 })
201 }
202}
203
204func TestMapExternalTask_LabelNormalization(t *testing.T) {
205 fm := FieldMap{LabelsToTags: true}

Callers

nothing calls this directly

Calls 1

normalizeLabelFunction · 0.85

Tested by

no test coverage detected