Repository navigation
Expand file tree
/
Copy pathvitest.config.ts
More file actions
72 lines (69 loc) · 2.1 KB
/
Copy pathvitest.config.ts
File metadata and controls
72 lines (69 loc) · 2.1 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import { fileURLToPath } from 'node:url';
import { defineConfig } from 'vitest/config';
import packagesAndExamples from './vitest.workspace.js';
export default defineConfig({
resolve: {
alias: {
'@opencoven/sdk-core/browser': fileURLToPath(
new URL('./packages/core/src/browser.ts', import.meta.url),
),
'@opencoven/sdk-core': fileURLToPath(new URL('./packages/core/src/index.ts', import.meta.url)),
'@opencoven/cave-client/managed': fileURLToPath(
new URL('./packages/cave/src/managed.ts', import.meta.url),
),
'@opencoven/cave-client': fileURLToPath(new URL('./packages/cave/src/index.ts', import.meta.url)),
'@opencoven/coven-client': fileURLToPath(new URL('./packages/coven/src/index.ts', import.meta.url)),
'@opencoven/sdk': fileURLToPath(new URL('./packages/sdk/src/index.ts', import.meta.url)),
'@opencoven/dev-cli': fileURLToPath(new URL('./packages/cli/src/index.ts', import.meta.url)),
},
},
test: {
coverage: {
provider: 'v8',
reporter: ['text', 'json-summary', 'html'],
include: ['packages/*/src/**/*.ts'],
exclude: [
'packages/*/src/index.ts',
'packages/cli/src/bin.ts',
'packages/*/src/schemas.ts',
'packages/*/src/transport.ts',
],
thresholds: {
branches: 85,
functions: 90,
lines: 90,
statements: 90,
'packages/coven/src/discovery.ts': {
branches: 88,
functions: 98,
lines: 91,
statements: 91,
},
'packages/coven/src/transport-unix.ts': {
branches: 78,
functions: 98,
lines: 86,
statements: 86,
},
'packages/coven/src/transport-windows.ts': {
branches: 94,
functions: 90,
lines: 91,
statements: 91,
},
},
},
projects: [
packagesAndExamples,
{
extends: true,
test: {
name: 'root',
environment: 'node',
fileParallelism: false,
include: ['tests/**/*.spec.ts'],
},
},
],
},
});