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

Function TestProgressBarConcurrency

pkg/console/progress_test.go:297–307  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

295}
296
297func TestProgressBarConcurrency(t *testing.T) {
298 t.Run("multiple updates are safe", func(t *testing.T) {
299 bar := NewProgressBar(1000)
300
301 // Sequential updates should be safe
302 for i := int64(0); i <= 1000; i += 100 {
303 output := bar.Update(i)
304 assert.NotEmpty(t, output, "Each update should produce output")
305 }
306 })
307}
308
309func TestProgressBarNonTTYFallback(t *testing.T) {
310 // This test documents the expected behavior in non-TTY environments

Callers

nothing calls this directly

Calls 3

UpdateMethod · 0.95
NewProgressBarFunction · 0.70
RunMethod · 0.45

Tested by

no test coverage detected