( home: string, text: string, extension: "jsonc" | "json" = "jsonc", )
| 47 | } |
| 48 | |
| 49 | function writeUserConfig( |
| 50 | home: string, |
| 51 | text: string, |
| 52 | extension: "jsonc" | "json" = "jsonc", |
| 53 | ): string { |
| 54 | const path = join(home, ".config", "cortexkit", `magic-context.${extension}`); |
| 55 | writeConfig(path, text); |
| 56 | return path; |
| 57 | } |
| 58 | |
| 59 | afterEach(() => { |
| 60 | if (originalHome === undefined) { |
no test coverage detected