glowing-fiesta/vitest.config.ts
Liviu Burcusel 3b58a25ccf
Added vitest (#5)
* Moved eslint and @nuxt/eslint to devDependencies

* Added vitest to project and 1 test

* Tweaked Sonar workflow in order to run tests and coverage

* Removed offending config line
2025-10-24 17:20:05 +02:00

44 lines
961 B
TypeScript

import { defineConfig } from "vitest/config";
import vue from "@vitejs/plugin-vue";
import { resolve } from "path";
export default defineConfig({
plugins: [vue()],
test: {
globals: true,
setupFiles: ["./tests/setup.ts"],
environment: "happy-dom",
include: ["tests/**/*.test.ts"],
coverage: {
provider: "v8",
reporter: ["text", "html", "lcov"],
clean: true,
cleanOnRerun: true,
exclude: [
"node_modules/**",
"dist/**",
"coverage/**",
"**/*.test.ts",
"tests/mocks/**",
// Exclude Nuxt generated files
".nuxt/**",
".output/**",
// Exclude TypeScript declaration files
"**/*.d.ts",
// Exclude config files
"*.config.*",
"assets/icons/**",
],
},
name: "GFiesta",
},
resolve: {
alias: {
"~": resolve(__dirname, "./app"),
"@": resolve(__dirname, "./app"),
},
},
});