mirror of
https://github.com/juherr/kill-the-news.git
synced 2026-06-20 22:03:48 +00:00
Testing
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
import { defineConfig } from 'vitest/config';
|
||||
|
||||
export default defineConfig({
|
||||
test: {
|
||||
// Use happy-dom for browser API simulation
|
||||
environment: 'happy-dom',
|
||||
|
||||
// Include source files for coverage
|
||||
include: ['src/**/*.{test,spec}.{js,ts}'],
|
||||
|
||||
// Coverage configuration
|
||||
coverage: {
|
||||
provider: 'v8',
|
||||
reporter: ['text', 'json', 'html'],
|
||||
include: ['src/**/*.ts'],
|
||||
exclude: [
|
||||
'src/**/*.{test,spec}.ts',
|
||||
'src/types/**',
|
||||
'src/scripts/**',
|
||||
'src/styles/**'
|
||||
]
|
||||
},
|
||||
|
||||
// Global setup files
|
||||
setupFiles: ['src/test/setup.ts'],
|
||||
|
||||
// Mock Cloudflare Workers runtime
|
||||
globals: true,
|
||||
|
||||
// Timeouts
|
||||
testTimeout: 10000,
|
||||
hookTimeout: 10000
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user