MCPcopy Index your code
hub / github.com/coder/coder / TestRunEscapesTripleBackticksInOutput

Function TestRunEscapesTripleBackticksInOutput

scripts/gotestsummary/main_test.go:113–124  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

111}
112
113func TestRunEscapesTripleBackticksInOutput(t *testing.T) {
114 t.Parallel()
115
116 jsonFile := writeEvents(t,
117 testEvent{Action: "output", Package: "example.com/pkg", Test: "TestFail", Output: "before ``` after\n"},
118 testEvent{Action: "fail", Package: "example.com/pkg", Test: "TestFail", Elapsed: 0.10},
119 )
120
121 markdown := runMarkdown(t, jsonFile, config{MaxOutputBytes: 8192})
122 require.Contains(t, markdown, "before `` after")
123 require.Equal(t, 2, strings.Count(markdown, "```"))
124}
125
126func TestRunMaxFailuresAddsOmittedLine(t *testing.T) {
127 t.Parallel()

Callers

nothing calls this directly

Calls 5

writeEventsFunction · 0.85
runMarkdownFunction · 0.85
CountMethod · 0.80
ContainsMethod · 0.45
EqualMethod · 0.45

Tested by

no test coverage detected