MCPcopy Create free account
hub / github.com/github/gh-aw / TestSpec_PublicAPI_RenderErrorBox

Function TestSpec_PublicAPI_RenderErrorBox

pkg/console/spec_test.go:542–553  ·  view source on GitHub ↗

TestSpec_PublicAPI_RenderErrorBox validates the documented RenderErrorBox function. Specification: "Returns a red-bordered error box displaying title."

(t *testing.T)

Source from the content-addressed store, hash-verified

540// TestSpec_PublicAPI_RenderErrorBox validates the documented RenderErrorBox function.
541// Specification: "Returns a red-bordered error box displaying title."
542func TestSpec_PublicAPI_RenderErrorBox(t *testing.T) {
543 result := RenderErrorBox("Build failed")
544 require.NotEmpty(t, result, "RenderErrorBox should return non-empty []string")
545
546 var sb strings.Builder
547 for _, line := range result {
548 sb.WriteString(line)
549 sb.WriteString("\n")
550 }
551 assert.Contains(t, sb.String(), "Build failed",
552 "RenderErrorBox output should contain the provided title")
553}
554
555// TestSpec_PublicAPI_RenderInfoSection validates the documented RenderInfoSection function.
556// Specification: "Returns content wrapped in a left-bordered info section with muted styling."

Callers

nothing calls this directly

Calls 2

RenderErrorBoxFunction · 0.70
StringMethod · 0.45

Tested by

no test coverage detected