(t *testing.T, root string, cfg config.ProjectConfig)
| 126 | } |
| 127 | |
| 128 | func 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 | |
| 143 | func writeStateOnly(t *testing.T, root string, state watch.State) { |
| 144 | t.Helper() |
no test coverage detected