MCPcopy Create free account
hub / github.com/MiniCodeMonkey/chief / TestWorktreeSpinnerSetError

Function TestWorktreeSpinnerSetError

internal/tui/worktree_spinner_test.go:95–110  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

93}
94
95func TestWorktreeSpinnerSetError(t *testing.T) {
96 s := NewWorktreeSpinner()
97 s.Configure("auth", "chief/auth", "main", ".chief/worktrees/auth/", "")
98
99 s.SetError("branch already exists")
100
101 if !s.HasError() {
102 t.Error("should have error")
103 }
104 if s.steps[0].errMsg != "branch already exists" {
105 t.Errorf("expected error on step 0, got %q", s.steps[0].errMsg)
106 }
107 if s.steps[0].active {
108 t.Error("step with error should not be active")
109 }
110}
111
112func TestWorktreeSpinnerCancel(t *testing.T) {
113 s := NewWorktreeSpinner()

Callers

nothing calls this directly

Calls 4

ConfigureMethod · 0.95
SetErrorMethod · 0.95
HasErrorMethod · 0.95
NewWorktreeSpinnerFunction · 0.85

Tested by

no test coverage detected