vitest.config.ts 453 B

12345678910111213141516171819
  1. /// <reference types="vitest" />
  2. import { defineConfig } from 'vite';
  3. import react from '@vitejs/plugin-react';
  4. import * as path from 'path';
  5. export default defineConfig({
  6. plugins: [react()],
  7. test: {
  8. // include: ["src/**.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
  9. environment: 'jsdom',
  10. globals: true,
  11. setupFiles: ['src/setupTests.ts'],
  12. },
  13. resolve: {
  14. alias: {
  15. '@': path.resolve(__dirname, './src'),
  16. },
  17. },
  18. });