diff --git a/jest.config.js b/jest.config.js index cc7c75b8..50253423 100644 --- a/jest.config.js +++ b/jest.config.js @@ -21,7 +21,8 @@ module.exports = { '@i18n/(.*)$': '/src/common/$1', '@leaflet/(.*)$': '/src/leaflet/$1', '\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': - '/test/unit/assetsTransformer.js' + '/test/unit/assetsTransformer.js', + '^axios$': require.resolve('axios') }, transform: { '^.+\\.ts$': '/node_modules/ts-jest', @@ -42,7 +43,7 @@ module.exports = { '!mapboxgl/*/__tests__/**/type.{js,jsx}' ], transformIgnorePatterns: [ - 'node_modules/(?!(mapbox-gl|element-ui|ant-design-vue|geographic-coordinate-converter|videojs-flvjs-es6|vue-videojs7|three)/)' + 'node_modules/(?!(mapbox-gl|axios|element-ui|ant-design-vue|geographic-coordinate-converter|videojs-flvjs-es6|vue-videojs7|three)/)' ], modulePaths: ['src', 'node_modules'], reporters: ["default", "jest-teamcity"],