-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.mjs
More file actions
33 lines (31 loc) · 912 Bytes
/
vitest.config.mjs
File metadata and controls
33 lines (31 loc) · 912 Bytes
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
import { defineConfig } from 'vitest/config'
import path from 'path'
import { fileURLToPath } from 'url'
const __dirname = path.dirname(fileURLToPath(import.meta.url))
export default defineConfig({
test: {
environment: 'node',
globals: true,
setupFiles: ['./apps/web-dashboard/tests/setup.ts'],
include: [
'apps/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}',
'packages/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'
],
exclude: [
'**/node_modules/**',
'**/dist/**',
'**/.{idea,git,cache,output,temp}/**',
'**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*',
'**/app/**', // Exclude Next.js app directory from tests
'**/components/**', // Exclude React components from unit tests
],
},
resolve: {
alias: {
'@': __dirname,
},
},
esbuild: {
target: 'node20',
},
})