(t *testing.T)
| 27 | } |
| 28 | |
| 29 | func TestSimpleTaskLogfLogsFormattedUpdates(t *testing.T) { |
| 30 | task := NewSimpleTask() |
| 31 | |
| 32 | var updates []*Update |
| 33 | |
| 34 | go func() { |
| 35 | for update := range task.Updates() { |
| 36 | updates = append(updates, update) |
| 37 | } |
| 38 | task.OnComplete() |
| 39 | }() |
| 40 | |
| 41 | task.Logf("Hello, world (%d)", 3+4) |
| 42 | task.Complete() |
| 43 | |
| 44 | require.Len(t, updates, 1) |
| 45 | assert.Equal(t, "Hello, world (7)", updates[0].S) |
| 46 | } |
| 47 | |
| 48 | func TestSimpleTaskCompleteClosesUpdates(t *testing.T) { |
| 49 | task := NewSimpleTask() |
nothing calls this directly
no test coverage detected