Skip to content

Commit

Permalink
fix: issue with jest and modules
Browse files Browse the repository at this point in the history
  • Loading branch information
oze4 committed Aug 6, 2021
1 parent e44ce4f commit 64842a9
Show file tree
Hide file tree
Showing 4 changed files with 179 additions and 3 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* https://jestjs.io/docs/en/configuration.html
*/

module.exports = {
export default {
// All imported modules in your tests should be mocked automatically
// automock: false,

Expand Down Expand Up @@ -186,7 +186,7 @@ module.exports = {

// A map from regular expressions to paths to transformers
transform: {
'\\.js$': ['babel-jest', { configFile: './babel.config.js' }]
'\\.js$': ['babel-jest', { configFile: './babel.config.cjs' }]
},

// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
Expand Down
175 changes: 175 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"scripts": {
"start": "./node_modules/.bin/webpack serve --config ./__tests__/demo/webpack.config.js --mode development --progress",
"build:esbuild": "node esbuild.config.js --experimental-modules",
"build:esbuild": "ts-node esbuild.config.js",
"build": "npm run build:esbuild",
"lint": "npm run eslint && npm run tsc",
"eslint": "./node_modules/.bin/eslint src/** -c ./.eslintrc --ignore-path ./.eslintignore",
Expand Down Expand Up @@ -94,6 +94,7 @@
"react-dom": ">=16.8.0",
"react-hot-loader": "^4.13.0",
"react-test-renderer": ">=16.8.0",
"ts-node": "^10.1.0",
"typescript": "^4.1.3",
"webpack": "^5.11.0",
"webpack-bundle-analyzer": "^4.3.0",
Expand Down

0 comments on commit 64842a9

Please sign in to comment.