chore: configure vitest with jsdom and layer aliases
This commit is contained in:
@@ -0,0 +1 @@
|
|||||||
|
import '@testing-library/jest-dom'
|
||||||
@@ -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'),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
Reference in New Issue
Block a user