Skip to content

Commit 58d725d

Browse files
committed
force jest to import the commonjs axios
1 parent 3471845 commit 58d725d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

jest.config.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ module.exports = {
6767
moduleFileExtensions: ["js", "mjs"],
6868

6969
// A map from regular expressions to module names that allow to stub out resources with a single module
70-
// moduleNameMapper: {},
70+
moduleNameMapper: {
71+
axios: "axios/dist/node/axios.cjs"
72+
},
7173

7274
// An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
7375
// modulePathIgnorePatterns: [],

0 commit comments

Comments
 (0)