trails/apps/journal/vitest.config.ts
Ullrich Schäfer 55463d1f56
Add mocked unit tests for REST API route handlers
Tests the full handler flow with mocked DB: auth guard (401), Zod
validation (400), successful responses, and 404s for missing resources.
Also adds ~ alias resolution to Journal vitest config.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 00:59:45 +02:00

11 lines
283 B
TypeScript

import { defineConfig, mergeConfig } from "vitest/config";
import shared from "../../vitest.shared.ts";
import { resolve } from "node:path";
export default mergeConfig(shared, defineConfig({
resolve: {
alias: {
"~": resolve(import.meta.dirname, "app"),
},
},
}));