Skip to content

Commit

Permalink
Fix Jest import/export issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtyomVancyan committed Nov 14, 2024
1 parent 9e5f298 commit c0cd71b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
12 changes: 12 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
presets: [
[
"@babel/preset-env",
{
targets: {
node: "current",
},
},
],
],
};
6 changes: 5 additions & 1 deletion jestconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
{
"transform": {
"^.+\\.tsx?$": "ts-jest"
"^.+\\.tsx?$": "ts-jest",
"^.+\\.jsx?$": "babel-jest"
},
"testRegex": "/tests/.*\\.test\\.(tsx?)$",
"moduleNameMapper": {
"^antd/es/(.+)$": "antd/lib/$1"
},
"transformIgnorePatterns": [
"/node_modules/(?!(react-phone-hooks)/)"
],
"modulePathIgnorePatterns": [
"<rootDir>/examples"
],
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,14 @@
"react-phone-hooks": "^0.1.12"
},
"devDependencies": {
"@babel/core": "^7.26.0",
"@babel/preset-env": "^7.26.0",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.5.1",
"@types/jest": "^29.5.7",
"@types/react": "^18.2.34",
"antd": "*",
"babel-jest": "^29.7.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"react": "^18.0.0",
Expand Down

0 comments on commit c0cd71b

Please sign in to comment.