-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvitest.config.js
39 lines (38 loc) · 1.25 KB
/
vitest.config.js
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
import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react';
export default defineConfig({
plugins: [react()],
test: {
globals: true,
environment: 'jsdom',
setupFiles: './vitest.setup.js',
include: [
'frontend/**/*.test.{js,jsx,ts,tsx}', // This will include only test files under the frontend directory
'frontend/**/__tests__/*.{js,jsx,ts,tsx}' // This will include only files in __tests__ directories under the frontend directory
],
coverage: {
provider: 'v8',
reporter: ['text', 'json-summary', 'json', 'lcov', 'clover'],
reportsDirectory: './frontend/coverage',
all: true,
include: [
'frontend/src/**/*.{js,jsx}'
],
exclude: [
'**/*.test.{js,jsx,ts,tsx}',
'frontend/src/setupTests.js',
'frontend/src/reportWebVitals.js',
'node_modules/',
'frontend/src/models/',
'frontend/src/App.jsx',
'frontend/src/main.jsx',
'frontend/src/styles/',
'frontend/src/utils/',
'frontend/src/components/EditBar.jsx',
'frontend/src/components/EditWindow.jsx',
'frontend/src/functions/loginFunctions.jsx',
'frontend/src/functions/CourseFunctions.jsx',
]
}
}
});