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

Function TestProjectInit_CodexFlag

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

Source from the content-addressed store, hash-verified

318}
319
320func TestProjectInit_CodexFlag(t *testing.T) {
321 tmpDir := t.TempDir()
322 resetProjectInitFlags(tmpDir)
323 projectInitCodex = true
324
325 err := runProjectInit(projectInitCmd, []string{})
326 if err != nil {
327 t.Fatalf("unexpected error: %v", err)
328 }
329
330 // Should create AGENTS.md and TASKMD_SPEC.md
331 agentsPath := filepath.Join(tmpDir, "AGENTS.md")
332 if _, err := os.Stat(agentsPath); os.IsNotExist(err) {
333 t.Error("AGENTS.md should have been created")
334 }
335
336 specPath := filepath.Join(tmpDir, specFilename)
337 if _, err := os.Stat(specPath); os.IsNotExist(err) {
338 t.Error("TASKMD_SPEC.md should have been created")
339 }
340
341 // Should NOT create CLAUDE.md
342 claudePath := filepath.Join(tmpDir, "CLAUDE.md")
343 if _, err := os.Stat(claudePath); err == nil {
344 t.Error("CLAUDE.md should not have been created when --codex is specified")
345 }
346}
347
348func TestProjectInit_AllAgentFlags(t *testing.T) {
349 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