evidence-anchor/vitest.config.ts
tegwick 0e93b68982 EANCH-WP-0001 T02: bootstrap standalone TS package + test harness
Add package.json (name evidence-anchor, exports . and ./pdf, scripts
test/typecheck/lint), tsconfig.json (mirrors engine, DOM+jsx), vitest.config.ts
(happy-dom + react plugin), eslint.config.js (confines viewer libs to src/pdf/),
.nvmrc, and placeholder src entrypoints. Depends on @citation-evidence/engine
via sibling-checkout link only; no citation-evidence internals.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-08 20:37:59 +02:00

17 lines
667 B
TypeScript

import { defineConfig } from "vitest/config";
import react from "@vitejs/plugin-react";
// Pure selector/resolution tests are node-safe; the scroll/highlight and PDF
// adapter tests touch the DOM, so the default environment is happy-dom. The
// react plugin lets the PDF adapter (.tsx) compile under test.
//
// The one shared-type dependency, `@citation-evidence/engine`, resolves through
// its package `exports` map (`./shared`) via the sibling-checkout link — no
// local alias needed. Nothing here imports `citation-evidence` internals.
export default defineConfig({
plugins: [react()],
test: {
environment: "happy-dom",
globals: false,
},
});