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.

37 lines
1.2 KiB

  1. module.exports = {
  2. preset: 'ts-jest',
  3. globals: {
  4. __DEV__: true,
  5. __TEST__: true,
  6. __VERSION__: require('./package.json').version,
  7. __BROWSER__: false,
  8. __GLOBAL__: false,
  9. __ESM_BUNDLER__: true,
  10. __ESM_BROWSER__: false,
  11. __NODE_JS__: true,
  12. __FEATURE_OPTIONS__: true,
  13. __FEATURE_SUSPENSE__: true
  14. },
  15. coverageDirectory: 'coverage',
  16. coverageReporters: ['html', 'lcov', 'text'],
  17. collectCoverageFrom: [
  18. 'packages/*/src/**/*.ts',
  19. '!packages/runtime-test/src/utils/**',
  20. '!packages/template-explorer/**',
  21. '!packages/size-check/**',
  22. '!packages/runtime-core/src/profiling.ts'
  23. ],
  24. watchPathIgnorePatterns: ['/node_modules/', '/dist/', '/.git/'],
  25. moduleFileExtensions: ['ts', 'tsx', 'js', 'json'],
  26. moduleNameMapper: {
  27. '^@vue/(.*?)$': '<rootDir>/packages/$1/src',
  28. vue: '<rootDir>/packages/vue/src'
  29. },
  30. rootDir: __dirname,
  31. testMatch: ['<rootDir>/packages/**/__tests__/**/*spec.[jt]s?(x)'],
  32. testPathIgnorePatterns: process.env.SKIP_E2E
  33. ? // ignore example tests on netlify builds since they don't contribute
  34. // to coverage and can cause netlify builds to fail
  35. ['/node_modules/', '/examples/__tests__']
  36. : ['/node_modules/']
  37. }