forked from temporalio/ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvitest.config.ts
35 lines (34 loc) · 1016 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
import path from 'path';
import { defineConfig } from 'vite';
import { configDefaults } from 'vitest/config';
import { svelte } from '@sveltejs/vite-plugin-svelte';
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, 'e2e', 'tests'],
environment: 'jsdom',
setupFiles: ['./vitest-setup.ts'],
deps: {
inline: ['date-fns'],
},
},
});