Repository Public
1import { defineConfig } from "vitest/config";2import path from "node:path";34/** Unit tests: pure functions and server-rendered components. No database connection is opened, no network. */5export default defineConfig({6 test: {7 include: ["tests/unit/**/*.test.{ts,tsx}"], testTimeout: 30_000,8 // Modules that import the database client need a URL to construct it; nothing connects in unit tests.9 env: { DATABASE_URL: "postgres://127.0.0.1:1/unit-tests-do-not-connect", APP_SECRET: "unit-test-secret-unit-test-secret-0123456789", STORAGE_ROOT: "/tmp/sheet-unit" },10 },11 resolve: { alias: { "@": path.resolve(import.meta.dirname, "src") } },12});13