-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
vitest.config.ts
41 lines (39 loc) · 993 Bytes
/
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
import { svelteTesting } from '@testing-library/svelte/vite';
import {
coverageConfigDefaults,
defineConfig,
mergeConfig,
} from 'vitest/config';
import viteConfig from './vite.config.js';
/**
* @see https://vitest.dev/config/#configuration
*/
export default mergeConfig(
viteConfig,
defineConfig({
plugins: [svelteTesting()],
test: {
include: ['./test/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
globals: true,
environment: 'jsdom',
watch: false,
setupFiles: './test/setup.ts',
clearMocks: true,
reporters: 'dot',
coverage: {
enabled: true,
reporter: ['text-summary', 'html'],
include: ['src/**/*.{js,ts,svelte}'],
exclude: [
'src/**/*.d.ts',
'src/routes/styleguide/**/*',
'src/routes/+layout.*',
...coverageConfigDefaults.exclude,
],
all: true,
skipFull: true,
reportOnFailure: true,
},
},
}),
);