-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathvitest.integration.config.ts
More file actions
39 lines (38 loc) · 1.25 KB
/
vitest.integration.config.ts
File metadata and controls
39 lines (38 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import { defineConfig } from 'vitest/config';
import path from 'node:path';
export default defineConfig({
resolve: {
alias: {
'@cf-wasm/resvg': path.resolve(import.meta.dirname, 'tests/helpers/stubs/resvg.ts'),
},
},
test: {
include: ['tests/integration/**/*.test.ts'],
environment: 'node',
globalSetup: ['tests/integration/_global-setup.ts'],
testTimeout: 30_000,
hookTimeout: 60_000,
maxConcurrency: 1,
pool: 'forks',
fileParallelism: false,
coverage: {
// Integration coverage is mostly empty because the worker + handlers
// run inside Miniflare's workerd isolate, which vitest's v8 collector
// can't see into. We keep coverage enabled only to expose any accidental
// *direct* imports from tests/integration → src (e.g. shape helpers).
// The handler files themselves get attribution from the direct-call
// unit tests in tests/unit/api-handlers-direct.test.ts.
provider: 'v8',
reporter: ['text-summary', 'json', 'lcov'],
reportsDirectory: 'coverage/integration',
include: [
'src/ssr/**/*.ts',
'src/utils/**/*.ts',
'src/api/**/*.ts',
],
exclude: [
'src/utils/image-generation.ts',
],
},
},
});