2
0

jest.config.ts 496 B

123456789101112131415161718192021222324
  1. export default {
  2. clearMocks: true,
  3. moduleFileExtensions: ['js', 'ts'],
  4. roots: ['<rootDir>'],
  5. testEnvironment: 'node',
  6. testMatch: ['**/*.test.ts'],
  7. transform: {
  8. '^.+\\.ts$': [
  9. 'ts-jest',
  10. {
  11. useESM: true,
  12. diagnostics: {
  13. ignoreCodes: [151002]
  14. }
  15. }
  16. ]
  17. },
  18. extensionsToTreatAsEsm: ['.ts'],
  19. transformIgnorePatterns: ['node_modules/(?!(@actions)/)'],
  20. moduleNameMapper: {
  21. '^(\\.{1,2}/.*)\\.js$': '$1'
  22. },
  23. verbose: true
  24. }