-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.desktop-contract.config.ts
More file actions
39 lines (37 loc) · 1.04 KB
/
vitest.desktop-contract.config.ts
File metadata and controls
39 lines (37 loc) · 1.04 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 path from 'node:path'
import { fileURLToPath } from 'node:url'
import react from '@vitejs/plugin-react'
import { defineConfig } from 'vitest/config'
const rootDir = path.dirname(fileURLToPath(import.meta.url))
export default defineConfig({
plugins: [react()],
test: {
environment: 'jsdom',
globals: true,
testTimeout: 15_000,
hookTimeout: 15_000,
setupFiles: ['./src/test/setup.ts'],
include: ['src/main.test.tsx', 'src/lib/ipc/**/*.test.ts'],
exclude: ['tests/e2e/**'],
coverage: {
// @ts-expect-error Vitest runtime supports `all`; the bundled type defs lag.
all: true,
provider: 'v8',
reporter: ['text'],
reportsDirectory: './coverage/js-desktop-contract',
include: ['src/main.tsx', 'src/lib/ipc/bridge.ts'],
exclude: ['src/**/*.test.ts', 'src/**/*.test.tsx'],
thresholds: {
lines: 100,
functions: 100,
branches: 100,
statements: 100,
},
},
},
resolve: {
alias: {
'@': path.join(rootDir, 'src'),
},
},
})