-
Notifications
You must be signed in to change notification settings - Fork 76
Expand file tree
/
Copy pathvite.config.js
More file actions
48 lines (46 loc) · 1 KB
/
vite.config.js
File metadata and controls
48 lines (46 loc) · 1 KB
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
44
45
46
47
48
import { sveltekit } from '@sveltejs/kit/vite';
import { svelteTesting } from '@testing-library/svelte/vite';
import { defineConfig } from 'vitest/config';
import dotenv from 'dotenv';
dotenv.config();
export default defineConfig({
plugins: [sveltekit(), svelteTesting()],
define: {
__SHOW_REGION_NAME_IN_NAV_BAR__: JSON.stringify(
process.env.SHOW_REGION_NAME_IN_NAV_BAR !== 'false'
),
__OBA_LOGO_URL_DARK__: JSON.stringify(process.env.OBA_LOGO_URL_DARK || '')
},
test: {
include: ['src/**/*.{test,spec}.{js,ts}'],
coverage: {
provider: 'v8',
reportsDirectory: './coverage',
reporter: ['html', 'lcov', 'text'],
all: true,
exclude: [
'**/tests',
'.svelte-kit',
'build',
'coverage',
'node_modules',
'**/*.d.ts',
'**/vendor/**'
],
thresholds: {
global: {
branches: 70,
functions: 70,
lines: 70,
statements: 70
}
}
},
environment: 'jsdom',
env: {
TZ: 'UTC'
},
setupFiles: ['./vitest-setup.js'],
globals: true
}
});