-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
vitest.config.mts
21 lines (20 loc) · 732 Bytes
/
vitest.config.mts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* eslint-disable import/no-extraneous-dependencies */
import react from '@vitejs/plugin-react';
import { loadEnv } from 'vite';
import tsconfigPaths from 'vite-tsconfig-paths';
import { defineConfig } from 'vitest/config';
export default defineConfig({
plugins: [react(), tsconfigPaths()],
test: {
globals: true, // This is needed by @testing-library to be cleaned up after each test
include: ['src/**/*.test.{js,jsx,ts,tsx}'],
coverage: {
include: ['src/**/*'],
exclude: ['src/**/*.stories.{js,jsx,ts,tsx}', '**/*.d.ts'],
reporter: ['html'],
},
environmentMatchGlobs: [['**/*.test.tsx', 'jsdom']],
setupFiles: ['./vitest-setup.ts'],
env: loadEnv('', process.cwd(), ''),
},
});