MCPcopy Create free account
hub / github.com/codehamr/codehamr / TestStatusBarShowsBudgetFromHeaders

Function TestStatusBarShowsBudgetFromHeaders

internal/tui/tui_test.go:1358–1363  ·  view source on GitHub ↗

TestStatusBarShowsBudgetFromHeaders: the pass segment renders whenever X-Budget-Remaining arrives: the header is the only signal, no profile gating. The percent is rounded to a whole number so it doesn't jitter on every token.

(t *testing.T)

Source from the content-addressed store, hash-verified

1356// TestHumanTokensFormat: the session counter renders compactly: plain int under
1357// 1000, then `k`/`M` with a constant single decimal. The decimal is always kept
1358// (`2.0k`, not `2k`) so the live counter doesn't jump width as it ticks past a
1359// round thousand.
1360func TestHumanTokensFormat(t *testing.T) {
1361 cases := []struct {
1362 n int
1363 want string
1364 }{
1365 {0, "0 tok"},
1366 {1, "1 tok"},

Callers

nothing calls this directly

Calls 2

runTurnFunction · 0.85
ViewMethod · 0.45

Tested by

no test coverage detected