-
Notifications
You must be signed in to change notification settings - Fork 450
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deepUnmock doesn't work well with ts-jest@24 #1098
Comments
prior to this commit 04ab3de , after the typescript had been transformed the transformed source was then passed to babel for an addition transform if you did not explicitly skip this step with skipBabel This would have performed hoisting. This has now been changed to opt in. ts-jest does attempt to port from the old method to the new but it only works for skipBabel = false. There is now the concept of presets in jest. ts-jest presets help configure the transform. Although one of these presets is called jsWithBabel it is not what now controls babel hoisting. For that you need to set the globals/ts-jest/ babelConfig property. In the case of your example repo setting this to true would have resulted in hoisting of deepUnmock.
Note that ts-jest does now do hoisting but it does not currently hoist deepUnmock. See my comment |
Closes via #1372 |
Issue :
deepUnmock doesn't work on ts-jest@24
Expected behavior :
deepUnmock should work on ts-jest@24
Debug log:
log file content
# content of ts-jest.log : No content
Minimal repo :
https://github.com/hojovi/jest_test_failure
The tests successes in ts-jest@23 but fails in ts-jest@24.
The text was updated successfully, but these errors were encountered: