You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
babel-jest's getCacheKey uses a variety of factors to generate the hash used for the cache, however currently doesn't include the list of options that were passed to the createTransformer constructor. This means there are incorrect cache hits even when the underlying options have changed.
To Reproduce
Steps to reproduce the behavior:
Create a custom transformer that's referenced by transform in the Jest config:
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
🐛 Bug Report
babel-jest's getCacheKey uses a variety of factors to generate the hash used for the cache, however currently doesn't include the list of options that were passed to the
createTransformer
constructor. This means there are incorrect cache hits even when the underlying options have changed.To Reproduce
Steps to reproduce the behavior:
transform
in the Jest config:babelOptions
(for example enabling babel preset-env'sdebug
option)Expected behavior
When Jest is run the second time, the previous cache entries are not re-used, and the changed babel config is seen in the results.
I'll open a PR to update
getCacheKey()
:https://github.com/facebook/jest/blob/d05e53a641366fcd1c2532ea845ce6fc8ce42a65/packages/babel-jest/src/index.js#L85-L105
The text was updated successfully, but these errors were encountered: