-
-
Notifications
You must be signed in to change notification settings - Fork 150
/
vitest.config.ts
42 lines (41 loc) · 1.51 KB
/
vitest.config.ts
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
import { fileURLToPath } from 'node:url';
import { mergeConfig, defineConfig, configDefaults } from 'vitest/config';
import viteConfig from './vite.config';
import { resolve } from 'path';
export default mergeConfig(
viteConfig,
defineConfig({
test: {
globals: true,
environment: 'jsdom',
exclude: [...configDefaults.exclude, 'e2e/*'],
root: fileURLToPath(new URL('./', import.meta.url)),
coverage: {
reporter: ['lcov'],
reportsDirectory: resolve(__dirname, 'coverage'),
exclude: [
'coverage/**',
'dist/**',
'**/[.]**',
'packages/*/ test?(s)/**',
'**/*.d.ts',
'**/ virtual:*',
'**/__x00__*',
'**/\x00*',
'cypress/**',
'test?(s)/**',
'test?(-*).?(c|m)[jt] s?(x)',
'**/*{.,-}{test,spec}?(-d).?(c|m)[jt] s?(x)',
'**/__tests__/**',
'**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*',
'**/ vitest.{workspace,projects}.[jt] s?(on)',
'**/.{eslint,mocha,prettier}rc.{?(c|m) js,yml}',
'dev/**',
'src/entry.ts',
'src/entry.esm.ts',
'docs/**',
],
},
},
}),
);