MCPcopy
hub / github.com/git-lfs/git-lfs / TestSimpleTaskLogLogsUpdates

Function TestSimpleTaskLogLogsUpdates

tasklog/simple_task_test.go:10–27  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

8)
9
10func 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
29func TestSimpleTaskLogfLogsFormattedUpdates(t *testing.T) {
30 task := NewSimpleTask()

Callers

nothing calls this directly

Calls 7

UpdatesMethod · 0.95
OnCompleteMethod · 0.95
LogMethod · 0.95
CompleteMethod · 0.95
NewSimpleTaskFunction · 0.85
LenMethod · 0.45
EqualMethod · 0.45

Tested by

no test coverage detected