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
This commit is contained in:
parent
c98879430b
commit
3b58a25ccf
9 changed files with 942 additions and 15 deletions
44
vitest.config.ts
Normal file
44
vitest.config.ts
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
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"),
|
||||
},
|
||||
},
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue