generated from diplodoc-platform/package-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.mjs
More file actions
32 lines (30 loc) · 1 KB
/
vitest.config.mjs
File metadata and controls
32 lines (30 loc) · 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
import {dirname, join} from 'node:path';
import {fileURLToPath} from 'node:url';
import {coverageConfigDefaults, defineConfig} from 'vitest/config';
const __dirname = dirname(fileURLToPath(import.meta.url));
export default defineConfig({
root: __dirname,
resolve: {
alias: {
// Run tests against source so coverage is collected from src/ (not build/)
'@diplodoc/directive': join(__dirname, 'src'),
},
},
test: {
globals: false,
include: ['tests/**/*.test.ts', 'tests/**/*.spec.ts'],
exclude: ['**/node_modules/**', 'build', 'dist', 'coverage'],
coverage: {
all: true,
provider: 'v8',
include: ['src/**'],
exclude: ['tests/**', ...coverageConfigDefaults.exclude],
excludeAfterRemap: true,
reporter: ['text', 'json', 'html', 'lcov'],
},
snapshotFormat: {
escapeString: true,
printBasicPrototype: true,
},
},
});