Files
openclaw/test/helpers/temp-repo.ts
Peter Steinberger f72782d87b refactor(test): restore auth persistence integrity (#125699)
* test: restore auth persistence integrity

Restore the SQLite-backed auth wizard assertions traced to 43ea501f38 and consolidate duplicated message-action and temp-directory fixtures.

* test: support npm 12 pack results
2026-08-18 02:58:30 -07:00

10 lines
410 B
TypeScript

// Temporary repo helper creates Git repositories for integration tests.
import fs from "node:fs";
import path from "node:path";
/** Write formatted JSON to a path, creating parent directories. */
export function writeJsonFile(filePath: string, value: unknown): void {
fs.mkdirSync(path.dirname(filePath), { recursive: true });
fs.writeFileSync(filePath, `${JSON.stringify(value, null, 2)}\n`, "utf8");
}