(t *testing.T)
| 138 | } |
| 139 | |
| 140 | func TestWorktreeSpinnerRender(t *testing.T) { |
| 141 | s := NewWorktreeSpinner() |
| 142 | s.Configure("auth", "chief/auth", "main", ".chief/worktrees/auth/", "npm install") |
| 143 | s.SetSize(80, 24) |
| 144 | |
| 145 | rendered := s.Render() |
| 146 | |
| 147 | // Should contain the title |
| 148 | if !strings.Contains(rendered, "Setting up worktree") { |
| 149 | t.Error("rendered output should contain title") |
| 150 | } |
| 151 | |
| 152 | // Should contain branch name |
| 153 | if !strings.Contains(rendered, "chief/auth") { |
| 154 | t.Error("rendered output should contain branch name") |
| 155 | } |
| 156 | |
| 157 | // Should contain worktree path |
| 158 | if !strings.Contains(rendered, ".chief/worktrees/auth/") { |
| 159 | t.Error("rendered output should contain worktree path") |
| 160 | } |
| 161 | |
| 162 | // Should contain setup command |
| 163 | if !strings.Contains(rendered, "npm install") { |
| 164 | t.Error("rendered output should contain setup command") |
| 165 | } |
| 166 | |
| 167 | // Should contain Esc hint |
| 168 | if !strings.Contains(rendered, "Esc") { |
| 169 | t.Error("rendered output should contain Esc hint") |
| 170 | } |
| 171 | } |
| 172 | |
| 173 | func TestWorktreeSpinnerRenderComplete(t *testing.T) { |
| 174 | s := NewWorktreeSpinner() |
nothing calls this directly
no test coverage detected