cli/pkg/cli/check_test.go
Virgil 8b30e80688
All checks were successful
Security Scan / security (push) Successful in 21s
feat(cli): add ASCII glyph fallbacks for tree and tracker
Co-authored-by: Virgil <virgil@lethean.io>
2026-04-02 05:23:01 +00:00

50 lines
817 B
Go

package cli
import "testing"
func TestCheckBuilder(t *testing.T) {
restoreThemeAndColors(t)
UseASCII() // Deterministic output
// Pass
c := Check("foo").Pass()
got := c.String()
if got == "" {
t.Error("Empty output for Pass")
}
// Fail
c = Check("foo").Fail()
got = c.String()
if got == "" {
t.Error("Empty output for Fail")
}
// Skip
c = Check("foo").Skip()
got = c.String()
if got == "" {
t.Error("Empty output for Skip")
}
// Warn
c = Check("foo").Warn()
got = c.String()
if got == "" {
t.Error("Empty output for Warn")
}
// Duration
c = Check("foo").Pass().Duration("1s")
got = c.String()
if got == "" {
t.Error("Empty output for Duration")
}
// Message
c = Check("foo").Message("status")
got = c.String()
if got == "" {
t.Error("Empty output for Message")
}
}