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