MCPcopy Create free account
hub / github.com/MiniCodeMonkey/chief / TestMigrateFromJSON_NoJsonFile

Function TestMigrateFromJSON_NoJsonFile

internal/prd/migrate_test.go:124–139  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

122}
123
124func TestMigrateFromJSON_NoJsonFile(t *testing.T) {
125 tmpDir := t.TempDir()
126
127 mdContent := `# Test
128### US-001: First
129- [ ] A
130`
131 if err := os.WriteFile(filepath.Join(tmpDir, "prd.md"), []byte(mdContent), 0644); err != nil {
132 t.Fatalf("failed to write: %v", err)
133 }
134
135 err := MigrateFromJSON(tmpDir)
136 if err == nil {
137 t.Error("expected error when prd.json doesn't exist")
138 }
139}
140
141func TestMigrateFromJSON_NoMdFile(t *testing.T) {
142 tmpDir := t.TempDir()

Callers

nothing calls this directly

Calls 1

MigrateFromJSONFunction · 0.85

Tested by

no test coverage detected