chore(cli): configure vitest

This commit is contained in:
Ayo Ayco 2024-12-07 10:29:31 +01:00
parent f77f78f459
commit b1778d09f9
4 changed files with 661 additions and 6 deletions

5
.gitignore vendored
View file

@ -1,11 +1,16 @@
dist
node_modules
coverage
html
*.log*
.nitro
.cache
.output
.env
*~
*swp
*swo
mcfly-app

View file

@ -8,7 +8,9 @@
"mcfly": "./index.js"
},
"scripts": {
"test": "vitest"
"test": "vitest",
"test:ui": "vitest --ui",
"coverage": "vitest run --coverage"
},
"repository": {
"type": "git",
@ -27,6 +29,9 @@
"consola": "^3.2.3"
},
"devDependencies": {
"@vitest/coverage-istanbul": "2.1.8",
"@vitest/coverage-v8": "2.1.8",
"@vitest/ui": "2.1.8",
"nitropack": "2.8",
"vitest": "^2.1.8"
}

View file

@ -1,7 +1,14 @@
import {defineConfig} from 'vitest/config';
import {coverageConfigDefaults, defineConfig} from 'vitest/config';
export default defineConfig({
test: {
globals: true,
reporters: ['html'],
coverage: {
enabled: true,
provider: 'v8',
reporter: 'html',
exclude: ['html/**', ...coverageConfigDefaults.exclude]
}
},
})

File diff suppressed because it is too large Load diff