-
Notifications
You must be signed in to change notification settings - Fork 71
/
vitest.config.ts
43 lines (41 loc) · 1.1 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
43
import path from 'path';
import { svelte } from '@sveltejs/vite-plugin-svelte';
import { defineConfig } from 'vite';
import { configDefaults } from 'vitest/config';
export default defineConfig({
plugins: [svelte({ hot: false })],
resolve: {
alias: {
$lib: path.resolve(__dirname, './src/lib'),
$types: path.resolve(__dirname, './src/types'),
$components: path.resolve(__dirname, './src/lib/components/'),
$app: path.resolve(__dirname, './src/lib/svelte-mocks/app/'),
$fixtures: path.resolve(__dirname, './src/fixtures/'),
},
},
test: {
globals: true,
coverage: {
reporter: ['text', 'json', 'html'],
exclude: [
...configDefaults.exclude,
'src/lib/svelte-mocks/**/*',
'src/lib/utilities/get-environment.ts',
'**/*.test.ts',
],
},
exclude: [
...configDefaults.exclude,
'package',
'build',
'e2e',
'tests',
'.svelte-kit',
],
environment: 'jsdom',
setupFiles: ['./vitest-setup.ts', 'vitest-localstorage-mock'],
deps: {
inline: ['date-fns'],
},
},
});