Skip to content

Commit

Permalink
Fix jest config
Browse files Browse the repository at this point in the history
Map axios module
  • Loading branch information
AlexRuiz7 committed Mar 9, 2023
1 parent 7fc1220 commit 5bf34a8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/jest/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,22 @@ export default {
`${kbnDir}/node_modules`
],
collectCoverageFrom: [
"**/*.{js,jsx,ts,tsx}",
"./!**/node_modules/**",
'**/*.{js,jsx,ts,tsx}',
'./!**/node_modules/**',
],
moduleNameMapper: {
'^ui/(.*)': `${kbnDir}/src/ui/public/$1`,
// eslint-disable-next-line max-len
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': `${kbnDir}/src/dev/jest/mocks/file_mock.js`,
'\\.(css|less|scss)$': `${kbnDir}/src/dev/jest/mocks/style_mock.js`,
'axios': 'axios/dist/node/axios.cjs',
},
setupFiles: [
`${kbnDir}/src/dev/jest/setup/babel_polyfill.js`,
`${kbnDir}/src/dev/jest/setup/enzyme.js`,
],
collectCoverage: true,
coverageDirectory: `./target/test-coverage`,
coverageDirectory: './target/test-coverage',
coverageReporters: [
'html',
'text-summary',
Expand Down

0 comments on commit 5bf34a8

Please sign in to comment.