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

Function TestSpinnerStopWithMessage

pkg/console/spinner_test.go:67–77  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

65}
66
67func TestSpinnerStopWithMessage(t *testing.T) {
68 spinner := NewSpinner("Processing...")
69
70 // This should not panic even if spinner is disabled
71 spinner.Start()
72 spinner.StopWithMessage("✓ Done successfully")
73
74 // Test calling StopWithMessage on a spinner that was never started
75 spinner2 := NewSpinner("Another test")
76 spinner2.StopWithMessage("✓ Completed")
77}
78
79func TestSpinnerMultipleStartStop(t *testing.T) {
80 spinner := NewSpinner("Test message")

Callers

nothing calls this directly

Calls 3

NewSpinnerFunction · 0.70
StartMethod · 0.45
StopWithMessageMethod · 0.45

Tested by

no test coverage detected