-
Notifications
You must be signed in to change notification settings - Fork 189
Expand file tree
/
Copy pathvitest.config.ts
More file actions
36 lines (34 loc) · 1018 Bytes
/
vitest.config.ts
File metadata and controls
36 lines (34 loc) · 1018 Bytes
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
import path, { resolve } from 'node:path';
import { fileURLToPath } from 'node:url';
import { defineConfig } from 'vitest/config';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
export default defineConfig({
resolve: {
alias: {
'@/lib': resolve(__dirname, 'lib'),
'@/store': resolve(__dirname, 'store'),
'@/assets': resolve(__dirname, 'assets'),
'@/types': resolve(__dirname, 'types'),
'@/styles': resolve(__dirname, 'styles'),
},
},
test: {
environment: 'jsdom',
globals: true,
setupFiles: ['test/setup/vitest.ts'],
include: ['test/unit/**/*.test.ts'],
coverage: {
provider: 'v8',
reporter: ['text', 'html', 'lcov'],
reportsDirectory: 'coverage',
thresholds: {
lines: 35,
branches: 25,
functions: 35,
statements: 35,
},
include: ['lib/document-utils.ts', 'lib/i18n.ts', 'lib/embed-api.ts', 'lib/onlyoffice-editor.ts'],
},
},
});