Bläddra i källkod

Update vitest config

Shun Miyazawa 2 år sedan
förälder
incheckning
a4d8014494
2 ändrade filer med 4 tillägg och 3 borttagningar
  1. 3 2
      apps/app/vitest.config.components.ts
  2. 1 1
      apps/app/vitest.config.ts

+ 3 - 2
apps/app/vitest.config.components.ts

@@ -1,15 +1,16 @@
+import react from '@vitejs/plugin-react';
 import tsconfigPaths from 'vite-tsconfig-paths';
 import tsconfigPaths from 'vite-tsconfig-paths';
 import { defineConfig } from 'vitest/config';
 import { defineConfig } from 'vitest/config';
 
 
 export default defineConfig({
 export default defineConfig({
   plugins: [
   plugins: [
-    tsconfigPaths(),
+    react(), tsconfigPaths(),
   ],
   ],
   test: {
   test: {
     globals: true,
     globals: true,
     environment: 'happy-dom',
     environment: 'happy-dom',
     include: [
     include: [
-      '**/*.test.tsx', '**/*.test.jsx',
+      '**/*.test.{tsx,jsx}',
     ],
     ],
   },
   },
 });
 });

+ 1 - 1
apps/app/vitest.config.ts

@@ -8,7 +8,7 @@ export default defineConfig({
   test: {
   test: {
     environment: 'node',
     environment: 'node',
     exclude: [
     exclude: [
-      '**/test/**', '**/*.test.tsx', '**/*.test.jsx',
+      '**/test/**', '**/*.test.{tsx,jsx}',
     ],
     ],
     clearMocks: true,
     clearMocks: true,
     globals: true,
     globals: true,