feat: Add non-interactive mode (#18)
This commit is contained in:
24
internal/tui/components/spinner/spinner_test.go
Normal file
24
internal/tui/components/spinner/spinner_test.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package spinner
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
func TestSpinner(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
// Create a spinner
|
||||
s := NewSpinner("Test spinner")
|
||||
|
||||
// Start the spinner
|
||||
s.Start()
|
||||
|
||||
// Wait a bit to let it run
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
|
||||
// Stop the spinner
|
||||
s.Stop()
|
||||
|
||||
// If we got here without panicking, the test passes
|
||||
}
|
||||
Reference in New Issue
Block a user