mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-06-05 12:44:22 +00:00
- vitest projects: node unit tests stay lean; new jsdom 'components' project runs *.test.tsx - component setup: matchMedia/ResizeObserver/localStorage polyfills, react-i18next init, persian-calendar-suite stub (only used under jalali locale) - smoke + field-label structure snapshots for Inbound & Outbound form modals - establishes the regression net required before decomposing the oversized form modals - 341 tests pass (337 unit + 4 component); typecheck/lint/build green
36 lines
787 B
TypeScript
36 lines
787 B
TypeScript
import path from 'node:path';
|
|
|
|
import react from '@vitejs/plugin-react';
|
|
import { defineConfig } from 'vitest/config';
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, 'src'),
|
|
},
|
|
},
|
|
test: {
|
|
globals: false,
|
|
projects: [
|
|
{
|
|
extends: true,
|
|
test: {
|
|
name: 'unit',
|
|
include: ['src/test/**/*.test.ts'],
|
|
environment: 'node',
|
|
setupFiles: ['./src/test/setup.ts'],
|
|
},
|
|
},
|
|
{
|
|
extends: true,
|
|
test: {
|
|
name: 'components',
|
|
include: ['src/test/**/*.test.tsx'],
|
|
environment: 'jsdom',
|
|
setupFiles: ['./src/test/setup.ts', './src/test/setup.components.ts'],
|
|
},
|
|
},
|
|
],
|
|
},
|
|
});
|