chore: configure vitest with jsdom and layer aliases

This commit is contained in:
Ilia Mashkov
2026-04-18 15:39:44 +03:00
parent 0fdafb22f1
commit 08071b3d27
2 changed files with 22 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
import '@testing-library/jest-dom'
+21
View File
@@ -0,0 +1,21 @@
import { defineConfig } from 'vitest/config'
import react from '@vitejs/plugin-react'
import path from 'path'
export default defineConfig({
plugins: [react()],
test: {
environment: 'jsdom',
globals: true,
setupFiles: ['./src/test/setup.ts'],
},
resolve: {
alias: {
'$shared': path.resolve(__dirname, './src/shared'),
'$entities': path.resolve(__dirname, './src/entities'),
'$widgets': path.resolve(__dirname, './src/widgets'),
'$features': path.resolve(__dirname, './src/features'),
'$app': path.resolve(__dirname, './src/app'),
},
},
})