(t *testing.T)
| 33 | } |
| 34 | |
| 35 | func TestRunPassingInputWritesNoMarkdown(t *testing.T) { |
| 36 | t.Parallel() |
| 37 | |
| 38 | jsonFile := writeEvents(t, |
| 39 | testEvent{Action: "output", Package: "example.com/pkg", Test: "TestOK", Output: "ok\n"}, |
| 40 | testEvent{Action: "pass", Package: "example.com/pkg", Test: "TestOK", Elapsed: 0.01}, |
| 41 | testEvent{Action: "pass", Package: "example.com/pkg", Elapsed: 0.02}, |
| 42 | ) |
| 43 | failuresFile := filepath.Join(t.TempDir(), "failures.ndjson") |
| 44 | |
| 45 | var stdout bytes.Buffer |
| 46 | err := run(context.Background(), config{ |
| 47 | JSONFile: jsonFile, |
| 48 | MarkdownOut: "-", |
| 49 | FailuresOut: failuresFile, |
| 50 | MaxOutputBytes: 8192, |
| 51 | }, &stdout, ioDiscard{}, emptyEnv) |
| 52 | require.NoError(t, err) |
| 53 | require.Empty(t, stdout.String()) |
| 54 | assertFileContent(t, failuresFile, "") |
| 55 | } |
| 56 | |
| 57 | func TestRunSingleFailureRendersBoundedOutput(t *testing.T) { |
| 58 | t.Parallel() |
nothing calls this directly
no test coverage detected