You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
735 B

import path from "node:path";
import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
environment: "node",
include: ["src/**/*.test.ts", "tests/**/*.test.ts"],
env: {
DATABASE_URL:
process.env.DATABASE_URL ||
"mysql://app:app@localhost:7023/email_forecast",
},
coverage: {
provider: "v8",
reporter: ["text", "text-summary", "json-summary"],
reportsDirectory: "./coverage",
reportOnFailure: true,
include: ["src/**/*.{ts,tsx}"],
exclude: [
"src/**/*.test.ts",
"src/app/**",
"src/components/**",
],
},
},
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
});