open-design/apps/web/vitest.config.ts
qiongyu1999 e367d2879e fix: replace PreviewModal motion with CSS animation, add motion test mock
- PreviewModal no longer uses motion/react — prevents test failures from
  AnimatePresence exit animations never completing in test env
- Add CSS animations for .ds-modal-backdrop (fade-in) and .ds-modal (scale-in)
- Add vitest alias to mock motion/react so AnimatePresence in other
  components (UpdaterPopup, ExamplesTab) completes synchronously in tests
2026-05-30 16:22:23 +08:00

14 lines
314 B
TypeScript

import { resolve } from 'node:path';
import { defineConfig } from 'vitest/config';
export default defineConfig({
resolve: {
alias: {
'motion/react': resolve(__dirname, 'tests/helpers/motion-mock.tsx'),
},
},
test: {
environment: 'node',
include: ['tests/**/*.test.{ts,tsx}'],
},
});