Skip to content
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

feature request: jest.requireActual #4137

Closed
aaronabramov opened this issue Jul 26, 2017 · 4 comments · Fixed by #4260
Closed

feature request: jest.requireActual #4137

aaronabramov opened this issue Jul 26, 2017 · 4 comments · Fixed by #4260
Assignees

Comments

@aaronabramov
Copy link
Contributor

when we patch the original require it becomes very hard to type tests.
i think we should move everything that is jest specific to jest object and have consistent type information for it

@thymikee
Copy link
Collaborator

Ok for me. What do you think @cpojer?

@cpojer
Copy link
Member

cpojer commented Jul 27, 2017

Yap, that's gonna be a gigantic codemod incoming for FB, so I suggest adding jest.requireActual, codemodding, and deprecating the other one.

One problem you'll have with this is that Jest's static analysis doesn't look at jest.requireActual, so you have to update jest-haste-map to include that into the dependency tracking.

@aaronabramov
Copy link
Contributor Author

good point! i'll add a codemod

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants