Run tests in a headless browser with vitest browser mode and playwright

This commit is contained in:
Alejandro Celaya
2025-04-08 11:49:33 +02:00
parent 09559c78af
commit 691e6c1afb
15 changed files with 451 additions and 182 deletions

View File

@@ -35,9 +35,16 @@ export default defineConfig({
// Vitest config
test: {
// Run tests in an actual browser
browser: {
provider: 'playwright',
enabled: true,
headless: true,
screenshotFailures: false,
instances: [{ browser: 'chromium' }],
},
globals: true,
allowOnly: true,
environment: 'jsdom',
setupFiles: './config/test/setupTests.ts',
coverage: {
provider: 'v8',