(t *testing.T)
| 8 | ) |
| 9 | |
| 10 | func TestSimpleTaskLogLogsUpdates(t *testing.T) { |
| 11 | task := NewSimpleTask() |
| 12 | |
| 13 | var updates []*Update |
| 14 | |
| 15 | go func() { |
| 16 | for update := range task.Updates() { |
| 17 | updates = append(updates, update) |
| 18 | } |
| 19 | task.OnComplete() |
| 20 | }() |
| 21 | |
| 22 | task.Log("Hello, world") |
| 23 | task.Complete() |
| 24 | |
| 25 | require.Len(t, updates, 1) |
| 26 | assert.Equal(t, "Hello, world", updates[0].S) |
| 27 | } |
| 28 | |
| 29 | func TestSimpleTaskLogfLogsFormattedUpdates(t *testing.T) { |
| 30 | task := NewSimpleTask() |
nothing calls this directly
no test coverage detected