2
0

jest-preset.json 707 B

1234567891011121314151617181920212223242526272829
  1. {
  2. "preset": "ts-jest",
  3. "testEnvironment": "jsdom",
  4. "testMatch": [
  5. "<rootDir>/tests/**/*.spec.{ts,tsx}",
  6. "<rootDir>/tests/**/*.test.{ts,tsx}"
  7. ],
  8. "collectCoverageFrom": [
  9. "src/**/*.{ts,tsx}",
  10. "!src/**/*.d.ts",
  11. "!src/**/index.{ts,tsx}",
  12. "!src/**/*.stories.{ts,tsx}"
  13. ],
  14. "coverageDirectory": "coverage",
  15. "coverageReporters": ["text", "lcov", "html"],
  16. "testPathIgnorePatterns": [
  17. "/node_modules/",
  18. "/dist/",
  19. "/coverage/"
  20. ],
  21. "transform": {
  22. "^.+\\.(ts|tsx)$": "ts-jest",
  23. "^.+\\.(js|jsx)$": "babel-jest"
  24. },
  25. "transformIgnorePatterns": [
  26. "/node_modules/(?!(swiper|@tarojs)/)"
  27. ],
  28. "moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json"]
  29. }