🛠️ Configure testing setup and update Vitest configuration
This commit is contained in:
36
code/websites/pokedex.online/vitest.config.js
Normal file
36
code/websites/pokedex.online/vitest.config.js
Normal file
@@ -0,0 +1,36 @@
|
||||
import { defineConfig } from 'vitest/config';
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [vue()],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': fileURLToPath(new URL('./src', import.meta.url))
|
||||
}
|
||||
},
|
||||
test: {
|
||||
globals: true,
|
||||
environment: 'happy-dom',
|
||||
setupFiles: ['./tests/setup.js'],
|
||||
coverage: {
|
||||
provider: 'v8',
|
||||
reporter: ['text', 'json', 'html', 'lcov'],
|
||||
exclude: [
|
||||
'node_modules/',
|
||||
'tests/',
|
||||
'dist/',
|
||||
'server/',
|
||||
'*.config.js',
|
||||
'.eslintrc.cjs'
|
||||
],
|
||||
thresholds: {
|
||||
lines: 80,
|
||||
functions: 80,
|
||||
branches: 75,
|
||||
statements: 80
|
||||
}
|
||||
},
|
||||
include: ['tests/**/*.test.js', 'tests/**/*.spec.js']
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user