(t *testing.T)
| 177 | } |
| 178 | |
| 179 | func 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 | |
| 204 | func TestMapExternalTask_LabelNormalization(t *testing.T) { |
| 205 | fm := FieldMap{LabelsToTags: true} |
nothing calls this directly
no test coverage detected