(t *testing.T)
| 259 | } |
| 260 | |
| 261 | func TestAppendNextSteps(t *testing.T) { |
| 262 | testCases := []struct { |
| 263 | processed []string |
| 264 | expectedOut []string |
| 265 | }{ |
| 266 | { |
| 267 | processed: []string{}, |
| 268 | expectedOut: []string{}, |
| 269 | }, |
| 270 | { |
| 271 | processed: []string{"", ""}, |
| 272 | expectedOut: []string{}, |
| 273 | }, |
| 274 | { |
| 275 | processed: []string{"Some hint", "", "Some other hint"}, |
| 276 | expectedOut: []string{"Some hint", "", "Some other hint"}, |
| 277 | }, |
| 278 | { |
| 279 | processed: []string{"Hint 1", "Hint 2"}, |
| 280 | expectedOut: []string{"Hint 1", "Hint 2"}, |
| 281 | }, |
| 282 | } |
| 283 | |
| 284 | for _, tc := range testCases { |
| 285 | t.Run("", func(t *testing.T) { |
| 286 | got, appended := appendNextSteps([]string{}, tc.processed) |
| 287 | assert.Check(t, is.DeepEqual(got, tc.expectedOut)) |
| 288 | assert.Check(t, is.Equal(appended, len(got) > 0)) |
| 289 | }) |
| 290 | } |
| 291 | } |
| 292 | |
| 293 | func TestRunPluginHooksPassesErrorMessage(t *testing.T) { |
| 294 | cfg := configfile.New("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…