Skip to content

Commit

Permalink
Merge pull request #432 from klougod/fix-jest-425
Browse files Browse the repository at this point in the history
Fixes undefined properties error in tests (closes issue #425)
  • Loading branch information
dilanx committed Jul 1, 2022
2 parents 85ed4c1 + 7ab5c88 commit df837e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function createJestBabelTransform(cracoConfig) {
}
}
}
return babelJest.createTransformer(craBabelTransformer);
return babelJest.default.createTransformer(craBabelTransformer);
}

module.exports = {
Expand Down
2 changes: 1 addition & 1 deletion packages/craco/lib/features/jest/jest-babel-transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = {
...createJestBabelTransform(),
process(src, filename, config, transformOptions) {
if (!jestBabelTransform) {
jestBabelTransform = createJestBabelTransform(config.globals._cracoConfig);
jestBabelTransform = createJestBabelTransform(config._cracoConfig);
}

return jestBabelTransform.process(src, filename, config, transformOptions);
Expand Down

0 comments on commit df837e0

Please sign in to comment.