jest.config.js 753 B

1234567891011121314151617181920212223242526
  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. __RUNTIME_COMPILE__: true,
  9. __FEATURE_OPTIONS__: true,
  10. __FEATURE_SUSPENSE__: true
  11. },
  12. coverageDirectory: 'coverage',
  13. coverageReporters: ['html', 'lcov', 'text'],
  14. collectCoverageFrom: [
  15. 'packages/*/src/**/*.ts',
  16. '!packages/template-explorer/**',
  17. '!packages/runtime-test/src/utils/**'
  18. ],
  19. watchPathIgnorePatterns: ['/node_modules/'],
  20. moduleFileExtensions: ['ts', 'tsx', 'js', 'json'],
  21. moduleNameMapper: {
  22. '^@vue/(.*?)$': '<rootDir>/packages/$1/src'
  23. },
  24. rootDir: __dirname,
  25. testMatch: ['<rootDir>/packages/**/__tests__/**/*spec.[jt]s?(x)']
  26. }