jest.config.js 801 B

12345678910111213141516171819202122232425
  1. module.exports = {
  2. transform: {
  3. '^.+\\.tsx?$': 'ts-jest'
  4. },
  5. transformIgnorePatterns: ['/node_modules/(?!@cloudbase).+\\.js$'],
  6. globals: {
  7. 'ts-jest': {
  8. isolatedModules: true,
  9. tsConfig: 'tsconfig.test.json'
  10. }
  11. },
  12. verbose: true,
  13. testURL: 'http://localhost/',
  14. testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$',
  15. moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
  16. testEnvironment: 'node',
  17. setupTestFrameworkScriptFile: '<rootDir>/test/setup.js',
  18. coverageReporters: ['json', 'lcov', 'clover', 'text-summary'],
  19. coveragePathIgnorePatterns: [
  20. // 该路径下的测试,忽略在测试覆盖率上
  21. 'lib',
  22. 'test/common',
  23. 'test/config.local.js'
  24. ]
  25. }