You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.2 KiB

  1. import { configDefaults, defineConfig } from 'vitest/config'
  2. import { entries } from './scripts/aliases.js'
  3. import codspeedPlugin from '@codspeed/vitest-plugin'
  4. export default defineConfig({
  5. define: {
  6. __DEV__: true,
  7. __TEST__: true,
  8. __VERSION__: '"test"',
  9. __BROWSER__: false,
  10. __GLOBAL__: false,
  11. __ESM_BUNDLER__: true,
  12. __ESM_BROWSER__: false,
  13. __CJS__: true,
  14. __SSR__: true,
  15. __FEATURE_OPTIONS_API__: true,
  16. __FEATURE_SUSPENSE__: true,
  17. __FEATURE_PROD_DEVTOOLS__: false,
  18. __FEATURE_PROD_HYDRATION_MISMATCH_DETAILS__: false,
  19. __COMPAT__: true,
  20. },
  21. resolve: {
  22. alias: entries,
  23. },
  24. plugins: [codspeedPlugin()],
  25. test: {
  26. globals: true,
  27. setupFiles: 'scripts/setup-vitest.ts',
  28. environmentMatchGlobs: [
  29. ['packages/{vue,vue-compat,runtime-dom}/**', 'jsdom'],
  30. ],
  31. sequence: {
  32. hooks: 'list',
  33. },
  34. coverage: {
  35. provider: 'istanbul',
  36. reporter: ['text', 'html'],
  37. exclude: [
  38. ...configDefaults.coverage.exclude!,
  39. // DOM transitions are tested via e2e so no coverage is collected
  40. 'packages/runtime-dom/src/components/Transition*',
  41. // mostly entries
  42. 'packages/vue-compat/**',
  43. ],
  44. },
  45. },
  46. })