mirror of
https://github.com/baairon/torlink.git
synced 2026-07-08 18:28:22 +02:00
16 lines
536 B
TypeScript
16 lines
536 B
TypeScript
import os from "node:os";
|
|||
|
|
import path from "node:path";
|
||
|
|
import { defineConfig } from "vitest/config";
|
||
|
|
|
||
|
|
// Keep tests off the real user data dir: redirect all persisted state (queue /
|
||
|
|
// history / seeds / config) into a temp folder via the TORLINK_STATE_DIR
|
||
|
|
// override that src/config/paths.ts honors. Applied before test modules import
|
||
|
|
// paths.ts, so every write during a run lands here instead.
|
||
|
|
export default defineConfig({
|
||
|
|
test: {
|
||
|
|
env: {
|
||
|
|
TORLINK_STATE_DIR: path.join(os.tmpdir(), "torlink-test-state"),
|
||
|
|
},
|
||
|
|
},
|
||
|
|
});
|