MCPcopy
hub / github.com/basecamp/once / TestTrafficCardViewContainsErrors

Function TestTrafficCardViewContainsErrors

internal/ui/metric_card_test.go:66–73  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

64}
65
66func TestTrafficCardViewContainsErrors(t *testing.T) {
67 card := NewTrafficCard([]float64{100}, []float64{10}, ChartScale{max: 200}, 10, 3, 5)
68 view := card.View(25)
69
70 assert.Contains(t, view, "Traffic")
71 assert.Contains(t, view, "/min")
72 assert.Contains(t, view, "errors")
73}
74
75func TestTrafficCardZeroErrors(t *testing.T) {
76 card := NewTrafficCard([]float64{100}, []float64{0}, ChartScale{max: 200}, 0, 3, 5)

Callers

nothing calls this directly

Calls 2

NewTrafficCardFunction · 0.85
ViewMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…