jest.config.js 659 B

123456789101112131415161718192021222324
  1. module.exports = {
  2. preset: 'ts-jest',
  3. globals: {
  4. __DEV__: true,
  5. __BROWSER__: false,
  6. __JSDOM__: true,
  7. __RUNTIME_COMPILE__: true,
  8. __FEATURE_OPTIONS__: true,
  9. __FEATURE_SUSPENSE__: true
  10. },
  11. coverageDirectory: 'coverage',
  12. coverageReporters: ['html', 'lcov', 'text'],
  13. collectCoverageFrom: [
  14. 'packages/*/src/**/*.ts',
  15. '!packages/template-explorer/**'
  16. ],
  17. watchPathIgnorePatterns: ['/node_modules/'],
  18. moduleFileExtensions: ['ts', 'tsx', 'js', 'json'],
  19. moduleNameMapper: {
  20. '^@vue/(.*?)$': '<rootDir>/packages/$1/src'
  21. },
  22. rootDir: __dirname,
  23. testMatch: ['<rootDir>/packages/**/__tests__/**/*spec.[jt]s?(x)']
  24. }