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

Function renderTest

render/view.go:49–63  ·  view source on GitHub ↗
(text string, spinner string, isFinished bool, isSubmit *bool, passed *bool)

Source from the content-addressed store, hash-verified

47}
48
49func renderTest(text string, spinner string, isFinished bool, isSubmit *bool, passed *bool) string {
50 testStr := ""
51 if !isFinished {
52 testStr += fmt.Sprintf("%s %s", spinner, text)
53 } else if isSubmit != nil && !*isSubmit {
54 testStr += text
55 } else if passed == nil {
56 testStr += gray.Render(fmt.Sprintf("? %s", text))
57 } else if *passed {
58 testStr += green.Render(fmt.Sprintf("✓ %s", text))
59 } else {
60 testStr += red.Render(fmt.Sprintf("X %s", text))
61 }
62 return testStr
63}
64
65func renderJqOutputs(outputs []api.CLICommandJqOutput) string {
66 if len(outputs) == 0 {

Callers 2

renderTestHeaderFunction · 0.85
renderTestsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected