papertrail/vitest.config.ts
caelum0x 695a365ae4 feat: PaperTrail — enterprise evidence-verification platform
Multi-tenant platform (182 pages, 228 API routes, ~30 modules) built on a
deterministic verification core: clinical-trial claims checked against
ClinicalTrials.gov registered results and raw event counts (ARR/NNT/RR+CI
recomputed in code, oracle-tested), code-enforced exact-span grounding, and
multi-source cross-verification. Auth/RBAC/multi-tenancy, document processing
at scale (unpdf + Docling), agentic workflows, Claude Science connector,
compliance/audit, billing, public API, and more.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-08 07:21:22 +03:00

30 lines
1.1 KiB
TypeScript

import { fileURLToPath } from "node:url";
import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
// Default environment stays node so existing .test.ts files are unaffected.
environment: "node",
// .test.tsx files (React component tests) run under jsdom; .test.ts stay node.
environmentMatchGlobs: [["**/*.test.tsx", "jsdom"]],
include: ["tests/**/*.test.ts", "tests/**/*.test.tsx"],
// Runs for all test files. Importing jest-dom only augments `expect`; it is a
// harmless no-op under node, so this does not affect the existing node tests.
setupFiles: ["tests/setup-dom.ts"],
},
// Use React's automatic JSX runtime so component tests don't need to import
// React explicitly. Applies only to JSX/TSX transform; plain .ts is untouched.
esbuild: {
jsx: "automatic",
jsxImportSource: "react",
},
resolve: {
// Components import via the `@/*` tsconfig path alias; mirror it so component
// tests can resolve `@/lib/...` imports. Existing relative-import tests are
// unaffected.
alias: {
"@": fileURLToPath(new URL("./", import.meta.url)),
},
},
});