MCPcopy Index your code
hub / github.com/go-task/task / TestLayout

Function TestLayout

internal/summary/summary_test.go:101–119  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

99}
100
101func TestLayout(t *testing.T) {
102 t.Parallel()
103
104 buffer, l := createDummyLogger()
105 task := &ast.Task{
106 Task: "sample-task",
107 Summary: "line1\nline2\nline3\n",
108 Deps: []*ast.Dep{
109 {Task: "dependency"},
110 },
111 Cmds: []*ast.Cmd{
112 {Cmd: "command"},
113 },
114 }
115
116 summary.PrintTask(&l, task)
117
118 assert.Equal(t, expectedOutput(), buffer.String())
119}
120
121func expectedOutput() string {
122 expected := `task: sample-task

Callers

nothing calls this directly

Calls 4

PrintTaskFunction · 0.92
createDummyLoggerFunction · 0.85
expectedOutputFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…