test(vitest): amplia la suite con test unitari, integrazione, componenti e stress
- aggiunge test per gameState e utilita server - aggiunge test di integrazione WebSocket - aggiunge test componenti Vue (ControllerPage/DisplayPage) - aggiunge test stress su carico WebSocket - aggiorna configurazione Vitest per includere nuove cartelle e ambiente componenti - aggiorna script npm e dipendenze di test
This commit is contained in:
@@ -1,9 +1,19 @@
|
||||
import { defineConfig } from 'vitest/config'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [vue()],
|
||||
test: {
|
||||
include: ['tests/unit/**/*.{test,spec}.js', 'tests/integration/**/*.{test,spec}.js'],
|
||||
globals: true, // permette di usare describe/it/expect senza import
|
||||
environment: 'node', // per backend tests. Se testi componenti Vue, usa 'jsdom'
|
||||
include: [
|
||||
'tests/unit/**/*.{test,spec}.js',
|
||||
'tests/integration/**/*.{test,spec}.js',
|
||||
'tests/component/**/*.{test,spec}.js',
|
||||
'tests/stress/**/*.{test,spec}.js',
|
||||
],
|
||||
globals: true,
|
||||
environment: 'node',
|
||||
environmentMatchGlobs: [
|
||||
['tests/component/**', 'happy-dom'],
|
||||
],
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user