(t *testing.T)
| 126 | } |
| 127 | |
| 128 | func TestInitCommandHelp(t *testing.T) { |
| 129 | t.Parallel() |
| 130 | |
| 131 | cmd := NewInitCommand() |
| 132 | |
| 133 | // Test that help can be generated without error |
| 134 | helpText := cmd.Long |
| 135 | if !strings.Contains(helpText, "Initialize") { |
| 136 | t.Error("Expected help text to contain 'Initialize'") |
| 137 | } |
| 138 | |
| 139 | if !strings.Contains(helpText, ".gitattributes") { |
| 140 | t.Error("Expected help text to mention .gitattributes") |
| 141 | } |
| 142 | |
| 143 | if !strings.Contains(helpText, ".github/agents/agentic-workflows.md") { |
| 144 | t.Error("Expected help text to mention the Agentic Workflows custom agent") |
| 145 | } |
| 146 | |
| 147 | if !strings.Contains(helpText, ".github/skills/agentic-workflow-designer/SKILL.md") { |
| 148 | t.Error("Expected help text to mention the agentic workflow designer skill") |
| 149 | } |
| 150 | |
| 151 | if !strings.Contains(helpText, "Copilot") { |
| 152 | t.Error("Expected help text to mention Copilot") |
| 153 | } |
| 154 | |
| 155 | if !strings.Contains(helpText, "non-interactive repository setup") { |
| 156 | t.Error("Expected help text to mention non-interactive setup") |
| 157 | } |
| 158 | |
| 159 | if strings.Contains(helpText, "Usage:") { |
| 160 | t.Error("Expected init long help text to not embed a Usage section") |
| 161 | } |
| 162 | } |
| 163 | |
| 164 | func TestInitCommandInteractiveModeDetection(t *testing.T) { |
| 165 | t.Parallel() |
nothing calls this directly
no test coverage detected