-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
[wip]: remove @types/jest
everywhere
#12415
Conversation
Exciting!! I played with this for 15 minutes last night without being able to make TS augment the global env. Hopefully you can figure out the correct incantation 😀 |
Found two possible solutions. First was sort of workaround. It augmentation work. The whole idea was to emit a I though to try explicit imports. Why not? Went through all Unfortunately, few tests have |
Hm.. Just a transpiler issue? If globals are imported, Babel playground is transpiling the problematic line |
Here is a minimal reproduction – https://github.com/mrazauskas/x-jest-globals. I simply added explicit import to this example – https://jestjs.io/docs/next/mock-functions#mocking-partials Only wondering if this is a bug or expected behaviour? |
It's supposed to change the import, it's not supposed to tag it in the babel plugin. 😅 Can you open up a bug report with it so we can track it separately? |
Closing in favour of #12856 |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
This is an experiment to see how easy (or hard) it could be to remove
@types/jest
fromjest
repo. Motivation is simple: own types of the repo are good enough (in some cases even better) than the ones from@types/jest
.Todo:
examples
directory).Test plan
Green CI