mirror of
https://github.com/go-task/task.git
synced 2025-01-26 05:27:15 +02:00
refactoring
This commit is contained in:
parent
5cfd9bbbbd
commit
a9012ebfc5
@ -26,10 +26,7 @@ func TestPrintsDependenciesIfPresent(t *testing.T) {
|
||||
|
||||
summary.Print(&l, task)
|
||||
|
||||
assert.Contains(t, buffer.String(), "\ndependencies:\n")
|
||||
assert.Contains(t, buffer.String(), "\n - dep1\n")
|
||||
assert.Contains(t, buffer.String(), "\n - dep2\n")
|
||||
assert.Contains(t, buffer.String(), "\n - dep3\n")
|
||||
assert.Contains(t, buffer.String(), "\ndependencies:\n"+" - dep1\n"+" - dep2\n"+" - dep3\n")
|
||||
}
|
||||
|
||||
func TestDoesNotPrintDependenciesIfMissing(t *testing.T) {
|
||||
@ -127,18 +124,17 @@ func TestFullSummary(t *testing.T) {
|
||||
}
|
||||
|
||||
func expectedOutput() string {
|
||||
expected :=
|
||||
`task: sample-task
|
||||
|
||||
line1
|
||||
line2
|
||||
line3
|
||||
|
||||
dependencies:
|
||||
- dependency
|
||||
|
||||
commands:
|
||||
- command
|
||||
`
|
||||
expected := `task: sample-task
|
||||
|
||||
line1
|
||||
line2
|
||||
line3
|
||||
|
||||
dependencies:
|
||||
- dependency
|
||||
|
||||
commands:
|
||||
- command
|
||||
`
|
||||
return expected
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user