MCPcopy Create free account
hub / github.com/driangle/taskmd / TestProjectInit_NoAgentFlag

Function TestProjectInit_NoAgentFlag

apps/cli/internal/cli/project_init_test.go:141–162  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

139}
140
141func TestProjectInit_NoAgentFlag(t *testing.T) {
142 tmpDir := t.TempDir()
143 resetProjectInitFlags(tmpDir)
144 projectInitNoAgent = true
145
146 err := runProjectInit(projectInitCmd, []string{})
147 if err != nil {
148 t.Fatalf("unexpected error: %v", err)
149 }
150
151 // Should create TASKMD_SPEC.md
152 specPath := filepath.Join(tmpDir, specFilename)
153 if _, err := os.Stat(specPath); os.IsNotExist(err) {
154 t.Error("TASKMD_SPEC.md should have been created")
155 }
156
157 // Should NOT create CLAUDE.md
158 claudePath := filepath.Join(tmpDir, "CLAUDE.md")
159 if _, err := os.Stat(claudePath); err == nil {
160 t.Error("CLAUDE.md should not have been created with --no-agent")
161 }
162}
163
164func TestProjectInit_NoSpecAndNoAgentAndNoTemplatesIsError(t *testing.T) {
165 tmpDir := t.TempDir()

Callers

nothing calls this directly

Calls 3

resetProjectInitFlagsFunction · 0.85
runProjectInitFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected