mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-08-02 18:45:21 +00:00
40 lines
1.0 KiB
TypeScript
40 lines
1.0 KiB
TypeScript
![]() |
import { defineConfig } from 'vitest/config'
|
||
|
import react from '@vitejs/plugin-react'
|
||
|
|
||
|
export default defineConfig({
|
||
|
plugins: [react()],
|
||
|
test: {
|
||
|
globals: true,
|
||
|
environment: 'jsdom',
|
||
|
setupFiles: ['./src/setupTests.ts'],
|
||
|
css: false, // Disable CSS processing to speed up tests
|
||
|
include: [
|
||
|
'src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'
|
||
|
],
|
||
|
exclude: [
|
||
|
'node_modules/',
|
||
|
'src/**/*.spec.ts', // Exclude Playwright E2E tests
|
||
|
'src/tests/test-fixtures/**'
|
||
|
],
|
||
|
testTimeout: 10000, // 10 second timeout
|
||
|
hookTimeout: 10000, // 10 second timeout for setup/teardown
|
||
|
coverage: {
|
||
|
reporter: ['text', 'json', 'html'],
|
||
|
exclude: [
|
||
|
'node_modules/',
|
||
|
'src/setupTests.ts',
|
||
|
'**/*.d.ts',
|
||
|
'src/tests/test-fixtures/**',
|
||
|
'src/**/*.spec.ts' // Exclude Playwright files from coverage
|
||
|
]
|
||
|
}
|
||
|
},
|
||
|
esbuild: {
|
||
|
target: 'es2020' // Use older target to avoid warnings
|
||
|
},
|
||
|
resolve: {
|
||
|
alias: {
|
||
|
'@': '/src'
|
||
|
}
|
||
|
}
|
||
|
})
|