(t *testing.T)
| 66 | } |
| 67 | |
| 68 | func TestPrintTaskCommandsIfPresent(t *testing.T) { |
| 69 | t.Parallel() |
| 70 | |
| 71 | buffer, l := createDummyLogger() |
| 72 | task := &ast.Task{ |
| 73 | Cmds: []*ast.Cmd{ |
| 74 | {Cmd: "command-1"}, |
| 75 | {Cmd: "command-2"}, |
| 76 | {Task: "task-1"}, |
| 77 | }, |
| 78 | } |
| 79 | |
| 80 | summary.PrintTask(&l, task) |
| 81 | |
| 82 | assert.Contains(t, buffer.String(), "\ncommands:\n") |
| 83 | assert.Contains(t, buffer.String(), "\n - command-1\n") |
| 84 | assert.Contains(t, buffer.String(), "\n - command-2\n") |
| 85 | assert.Contains(t, buffer.String(), "\n - Task: task-1\n") |
| 86 | } |
| 87 | |
| 88 | func TestDoesNotPrintCommandIfMissing(t *testing.T) { |
| 89 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…