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

Function TestProjectInit_NoSpecFlag

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

Source from the content-addressed store, hash-verified

116}
117
118func TestProjectInit_NoSpecFlag(t *testing.T) {
119 tmpDir := t.TempDir()
120 resetProjectInitFlags(tmpDir)
121 projectInitNoSpec = true
122
123 err := runProjectInit(projectInitCmd, []string{})
124 if err != nil {
125 t.Fatalf("unexpected error: %v", err)
126 }
127
128 // Should create CLAUDE.md
129 claudePath := filepath.Join(tmpDir, "CLAUDE.md")
130 if _, err := os.Stat(claudePath); os.IsNotExist(err) {
131 t.Error("CLAUDE.md should have been created")
132 }
133
134 // Should NOT create TASKMD_SPEC.md
135 specPath := filepath.Join(tmpDir, specFilename)
136 if _, err := os.Stat(specPath); err == nil {
137 t.Error("TASKMD_SPEC.md should not have been created with --no-spec")
138 }
139}
140
141func TestProjectInit_NoAgentFlag(t *testing.T) {
142 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