MCPcopy Create free account
hub / github.com/charmbracelet/bubbles / TestViewReturnsTimeoutString

Function TestViewReturnsTimeoutString

timer/timer_test.go:320–327  ·  view source on GitHub ↗

TestViewReturnsTimeoutString verifies that View returns the timeout as a string.

(t *testing.T)

Source from the content-addressed store, hash-verified

318
319// TestViewReturnsTimeoutString verifies that View returns the timeout as a string.
320func TestViewReturnsTimeoutString(t *testing.T) {
321 m := New(5*time.Second)
322 view := m.View()
323
324 if view != "5s" {
325 t.Errorf("expected View to return '5s', got '%s'", view)
326 }
327}
328
329// TestRunningReturnsFalseWhenTimedOut verifies that Running() returns false
330// when the timer has timed out.

Callers

nothing calls this directly

Calls 2

NewFunction · 0.70
ViewMethod · 0.45

Tested by

no test coverage detected