69 lines
1.2 KiB
JavaScript
69 lines
1.2 KiB
JavaScript
// File: vitest.config.js
|
|
// Generic configuration for vitest
|
|
|
|
import { defineConfig } from "vitest/config";
|
|
import vue from "@vitejs/plugin-vue";
|
|
import path from "path";
|
|
|
|
console.log("\n\n::: Reading vitest config.");
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
vue({
|
|
template: {
|
|
compilerOptions: {
|
|
hoistStatic: false,
|
|
},
|
|
},
|
|
}),
|
|
],
|
|
|
|
test: {
|
|
css: false,
|
|
pool: "forks",
|
|
singleThread: true,
|
|
|
|
define: {
|
|
__VUE_PROD_DEVTOOLS__: false,
|
|
},
|
|
|
|
coverage: {
|
|
provider: "v8",
|
|
clean: true,
|
|
cleanOnStart: true,
|
|
reporter: ["text", "html"],
|
|
|
|
thresholds: {
|
|
lines: 70,
|
|
statements: 70,
|
|
functions: 50,
|
|
branches: 40,
|
|
},
|
|
},
|
|
deps: {
|
|
optimizer: {
|
|
web: {
|
|
enabled: true,
|
|
include: ["@mui/material", "lucide-react"], // Add your largest component dependencies here
|
|
},
|
|
},
|
|
},
|
|
|
|
environment: "happy-dom",
|
|
|
|
globals: true,
|
|
|
|
server: {
|
|
deps: {
|
|
inline: ["vue", "@vue/test-utils", "pinia", "@pinia/testing"],
|
|
},
|
|
},
|
|
},
|
|
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
vue: path.resolve(__dirname, "./node_modules/vue"),
|
|
},
|
|
},
|
|
});
|