()
| 48 | }); |
| 49 | |
| 50 | async function readStoreFile(): Promise<unknown> { |
| 51 | const raw = await fs.readFile(getStoreFilePath(muxHome), "utf-8"); |
| 52 | return JSON.parse(raw) as unknown; |
| 53 | } |
| 54 | |
| 55 | test("reading corrupt JSON store self-heals to empty", async () => { |
| 56 | await fs.writeFile(getStoreFilePath(muxHome), "{ definitely not valid json", "utf-8"); |
no test coverage detected