-
Notifications
You must be signed in to change notification settings - Fork 284
Expand file tree
/
Copy pathvitest.config.ts
More file actions
51 lines (50 loc) · 1.31 KB
/
vitest.config.ts
File metadata and controls
51 lines (50 loc) · 1.31 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
49
50
51
import react from '@vitejs/plugin-react';
import { defineConfig } from 'vitest/config';
export default defineConfig({
plugins: [react()],
test: {
globals: true,
pool: 'threads',
clearMocks: true,
// Server configuration to handle external dependencies
server: {
deps: {
inline: ['@primer/react', '@primer/css'],
},
},
coverage: {
enabled: false,
reportOnFailure: true,
reporter: ['html', 'lcovonly'],
include: ['src/**/*'],
exclude: ['**/*.html', '**/*.graphql', '**/graphql/generated/**'],
},
projects: [
{
extends: true,
test: {
name: 'happy-dom [preload, renderer]',
environment: 'happy-dom',
css: true,
include: [
'src/preload/**/*.test.{ts,tsx}',
'src/renderer/**/*.test.{ts,tsx}',
],
setupFiles: ['./src/renderer/__helpers__/vitest.setup.ts'],
},
},
{
// TODO - Opportunity in future to move some of the renderer util tests to node environment
extends: true,
test: {
name: 'node [main, shared]',
environment: 'node',
include: [
'src/shared/**/*.test.{ts,tsx}',
'src/main/**/*.test.{ts,tsx}',
],
},
},
],
},
});