(t *testing.T)
| 55 | } |
| 56 | |
| 57 | func TestRunSingleFailureRendersBoundedOutput(t *testing.T) { |
| 58 | t.Parallel() |
| 59 | |
| 60 | jsonFile := writeEvents(t, |
| 61 | testEvent{Action: "output", Package: "example.com/pkg", Test: "TestFail", Output: "prefix-" + strings.Repeat("x", 20)}, |
| 62 | testEvent{Action: "fail", Package: "example.com/pkg", Test: "TestFail", Elapsed: 1.25}, |
| 63 | testEvent{Action: "fail", Package: "example.com/pkg", Elapsed: 1.50}, |
| 64 | ) |
| 65 | |
| 66 | markdown := runMarkdown(t, jsonFile, config{MaxOutputBytes: 10}) |
| 67 | require.Contains(t, markdown, "## Go test failures (2 in 1 packages)") |
| 68 | require.Contains(t, markdown, "| example.com/pkg | TestFail | 1.25s |") |
| 69 | require.NotContains(t, markdown, "prefix") |
| 70 | require.Contains(t, markdown, strings.Repeat("x", 10)) |
| 71 | } |
| 72 | |
| 73 | func TestRunSubtestFailureCapturesSlashName(t *testing.T) { |
| 74 | t.Parallel() |
nothing calls this directly
no test coverage detected