-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvite.config.ts
38 lines (37 loc) · 1.09 KB
/
vite.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
import { sveltekit } from '@sveltejs/kit/vite'
import { svelteTesting } from '@testing-library/svelte/vite'
import { configDefaults, defineConfig } from 'vitest/config'
export default defineConfig({
plugins: [sveltekit(), svelteTesting()],
resolve: process.env.VITEST
? {
conditions: ['browser']
}
: undefined,
test: {
include: ['src/lib/**/*.test.ts'],
globals: true,
environment: 'jsdom',
setupFiles: ['vitest.setup.ts'],
coverage: {
reporter: 'lcov',
exclude: ['docs/**', '.trunk/**', '.svelte-kit/**', 'tests/**', 'src/routes/**']
},
exclude: [
...configDefaults.exclude,
'node_modules/**',
'dist/**',
'docs/**',
'src/routes/**',
'coverage/**',
'tests/**',
'playwright.config.ts',
'tests-results/**',
'**/docs/**/*'
],
reporters: ['verbose', ['junit', { outputFile: './junit-vitest.xml' }]]
},
build: {
sourcemap: true
}
})