strat-gameplay-webapp/frontend-sba/vitest.config.ts
Cal Corum 2381456189 test: Skip unstable test suites
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 20:18:33 -06:00

63 lines
1.4 KiB
TypeScript

import { defineConfig } from 'vitest/config'
import vue from '@vitejs/plugin-vue'
import { resolve } from 'path'
// Setup process.env globally for Pinia before any imports
globalThis.process = globalThis.process || ({} as any)
globalThis.process.env = globalThis.process.env || {}
globalThis.process.env.NODE_ENV = 'test'
export default defineConfig({
plugins: [vue()],
define: {
'import.meta.client': 'true',
'import.meta.server': 'false',
},
test: {
globals: true,
environment: 'happy-dom',
env: {
NODE_ENV: 'test',
},
environmentOptions: {
happyDOM: {
settings: {
navigator: {
userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36',
},
},
},
},
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html', 'lcov'],
exclude: [
'node_modules/',
'.nuxt/',
'dist/',
'*.config.{js,ts}',
'tests/**',
'**/*.spec.ts',
'**/*.test.ts',
'types/**',
],
all: true,
thresholds: {
lines: 80,
functions: 80,
branches: 80,
statements: 80,
},
},
include: ['tests/**/*.spec.ts'],
setupFiles: ['./tests/setup.ts'],
},
resolve: {
alias: {
'~': resolve(__dirname, './'),
'@': resolve(__dirname, './'),
'#app': resolve(__dirname, './.nuxt/imports.d.ts'),
},
},
})