(t *testing.T)
| 98 | } |
| 99 | |
| 100 | func TestRunStripsANSIOutput(t *testing.T) { |
| 101 | t.Parallel() |
| 102 | |
| 103 | jsonFile := writeEvents(t, |
| 104 | testEvent{Action: "output", Package: "example.com/pkg", Test: "TestFail", Output: "\x1b[31mred\x1b[0m\n"}, |
| 105 | testEvent{Action: "fail", Package: "example.com/pkg", Test: "TestFail", Elapsed: 0.10}, |
| 106 | ) |
| 107 | |
| 108 | markdown := runMarkdown(t, jsonFile, config{MaxOutputBytes: 8192}) |
| 109 | require.Contains(t, markdown, "red") |
| 110 | require.NotContains(t, markdown, "\x1b") |
| 111 | } |
| 112 | |
| 113 | func TestRunEscapesTripleBackticksInOutput(t *testing.T) { |
| 114 | t.Parallel() |
nothing calls this directly
no test coverage detected