← Files Aivana Database EngineerARCHIVED FILE
tests/setup.cjs
374 Bytes · Oct 2, 2026 · 00:34 UTC
const fs = require("node:fs");
const os = require("node:os");
const path = require("node:path");
// Each test worker owns its state and cannot modify a user's advisor history.
const stateDir = fs.mkdtempSync(path.join(os.tmpdir(), "codexdb-test-"));
process.env.CODEXDB_STATE_DIR = stateDir;
process.on("exit", () => fs.rmSync(stateDir, { recursive: true, force: true }));
SHA-256: 06476898b0c7caf16da460a5fc4165f9b513476836c21c6c18c9b1f0c8d2a1d3