-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathvitest.config.ts
More file actions
34 lines (29 loc) · 1.05 KB
/
vitest.config.ts
File metadata and controls
34 lines (29 loc) · 1.05 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
// vitest.config.ts – put next to package.json of @masala/parser
import { defineConfig } from 'vitest/config'
export default defineConfig({
test: {
include: ['src/test/**/*.spec.js'],
// Vitest looks for ts/tsx by default; turn them off if you like
includeSource: [],
coverage: {
provider: 'v8', // default, but make it explicit
all: true, // check files not touched by tests, too
include: ['src/lib/**/*.js'],
exclude: [
// never count tests or potential fixtures
'src/test/**',
// ignore any build artefacts even if they sneak into src/
'**/*.d.ts',
'**/dist/**',
],
thresholds: {
lines: 100,
},
// Thresholds fail if *any* of these drop below the number
//branches: 100,
//functions: 100,
//statements: 100,
reporter: ['text', 'html'], // CLI + ./coverage/index.html
},
},
})