vitest.config.ts
This file
Path
apps/web/vitest.config.ts
28 lines · 854 bytes · TypeScript
Last changed by
Merge build/comments-web-rest into mainoscabrielbefore adoption0eb1248
History of this fileTake it
1234567891011121314151617181920212223242526272829import { preset } from "@repo/config/vitest";import { defineConfig, mergeConfig } from "vitest/config";
// Route modules import `cloudflare:workers`, which only workerd serves; in Node it resolves to a shim.export default mergeConfig( preset, defineConfig({ resolve: { // shadcn's `@/` imports, as in vite.config.ts. tsconfigPaths: true, alias: { "cloudflare:workers": new URL("test/workers-shim.ts", import.meta.url) .pathname, }, }, test: { // The shared tests read styles.css as text (`?raw`); vitest hands // every other stylesheet over empty. css: { include: [/\/src\/styles\.css/u] }, include: ["test/**/*.test.tsx"], typecheck: { enabled: true, include: ["test/**/*.test-d.ts"], tsconfig: "./tsconfig.json", }, }, }));