MCPcopy Index your code
hub / github.com/bootdotdev/bootdev / renderTests

Function renderTests

render/view.go:27–47  ·  view source on GitHub ↗
(tests []testModel, spinner string)

Source from the content-addressed store, hash-verified

25}
26
27func renderTests(tests []testModel, spinner string) string {
28 var str strings.Builder
29 var edges strings.Builder
30
31 for _, test := range tests {
32 testStr := renderTest(test.text, spinner, test.finished, nil, test.passed)
33 testStr = fmt.Sprintf(" %s", testStr)
34 height := lipgloss.Height(testStr)
35
36 edges.Reset()
37 edges.WriteString(" ├─")
38 for i := 1; i < height; i++ {
39 edges.WriteString("\n │ ")
40 }
41
42 str.WriteString(lipgloss.JoinHorizontal(lipgloss.Top, edges.String(), testStr))
43 str.WriteByte('\n')
44 }
45
46 return str.String()
47}
48
49func renderTest(text string, spinner string, isFinished bool, isSubmit *bool, passed *bool) string {
50 testStr := ""

Callers 1

ViewMethod · 0.85

Calls 1

renderTestFunction · 0.85

Tested by

no test coverage detected