AI made playwright tests + add them to the github.

This commit is contained in:
KingKDot
2026-07-15 12:12:13 -05:00
parent 22b0eed5e1
commit 8ad81efdc3
16 changed files with 554 additions and 9 deletions
+19
View File
@@ -0,0 +1,19 @@
import { mkdtempSync, writeFileSync } from "node:fs";
import { tmpdir } from "node:os";
import { join } from "node:path";
const suppliedDataDir =
process.env.OVERLORD_TEST_DATA_DIR === "1" && process.env.DATA_DIR?.trim()
? process.env.DATA_DIR
: undefined;
const testDataDir = suppliedDataDir ?? mkdtempSync(join(tmpdir(), "overlord-bun-test-"));
// These must be set before any application module imports config or opens the
// singleton SQLite connection.
process.env.NODE_ENV = "test";
process.env.DATA_DIR = testDataDir;
process.env.OVERLORD_TEST_DATA_DIR = "1";
// A persistent config in DATA_DIR prevents the loader from falling back to the
// repository's legacy config.json, which may contain real deployment settings.
writeFileSync(join(testDataDir, "config.json"), "{}\n", "utf8");