MCPcopy Create free account
hub / github.com/JordanCoin/codemap / writeProjectConfig

Function writeProjectConfig

cmd/hooks_more_test.go:128–141  ·  view source on GitHub ↗
(t *testing.T, root string, cfg config.ProjectConfig)

Source from the content-addressed store, hash-verified

126}
127
128func writeProjectConfig(t *testing.T, root string, cfg config.ProjectConfig) {
129 t.Helper()
130
131 if err := os.MkdirAll(filepath.Join(root, ".codemap"), 0o755); err != nil {
132 t.Fatal(err)
133 }
134 data, err := json.Marshal(cfg)
135 if err != nil {
136 t.Fatal(err)
137 }
138 if err := os.WriteFile(config.ConfigPath(root), data, 0o644); err != nil {
139 t.Fatal(err)
140 }
141}
142
143func writeStateOnly(t *testing.T, root string, state watch.State) {
144 t.Helper()

Calls 1

ConfigPathFunction · 0.92

Tested by

no test coverage detected