forked from shlinkio/shlink-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vitest.config.ts
37 lines (34 loc) · 916 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
import react from '@vitejs/plugin-react';
import { defineConfig } from 'vitest/config';
// Using a separate vitest config, so that we don't load the remix vite plugin during tests
export default defineConfig({
plugins: [react()],
test: {
globals: true,
allowOnly: true,
environmentMatchGlobs: [
['**/*.server.test.{ts|tsx}', 'node'],
['**/*', 'jsdom'],
],
setupFiles: './test/setup.ts',
dir: 'test',
coverage: {
provider: 'v8',
reportsDirectory: './coverage',
include: [
'app/**/*.ts',
'app/**/*.tsx',
'!app/db/**/*.ts',
'!app/entities/*.ts',
],
reporter: ['text', 'text-summary', 'clover', 'html'],
// Required code coverage. Lower than this will make the check fail
thresholds: {
statements: 80,
branches: 95,
functions: 90,
lines: 80,
},
},
},
});