vitest.config.mts 921 B

123456789101112131415161718192021222324252627
  1. import path from 'path';
  2. import swc from 'unplugin-swc';
  3. import { defineConfig } from 'vitest/config';
  4. export default defineConfig({
  5. test: {
  6. /**
  7. * For local debugging of the e2e tests, we set a very long timeout value otherwise tests will
  8. * automatically fail for going over the 5 second default timeout.
  9. */
  10. testTimeout: process.env.E2E_DEBUG ? 1800 * 1000 : process.env.CI ? 30 * 1000 : 15 * 1000,
  11. // threads: false,
  12. // singleThread: true,
  13. // reporters: ['verbose'],
  14. typecheck: {
  15. tsconfig: path.join(__dirname, 'tsconfig.e2e.json'),
  16. },
  17. },
  18. plugins: [
  19. // SWC required to support decorators used in test plugins
  20. // See https://github.com/vitest-dev/vitest/issues/708#issuecomment-1118628479
  21. // Vite plugin
  22. swc.vite(),
  23. // Rollup plugin
  24. swc.rollup() as any,
  25. ],
  26. });