-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
use requireActual and requireMock from jest instead of require #21849
Conversation
Generated by 🚫 dangerJS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TheSavior is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Thanks for this. If you are curious, it looks like the majority of Facebook's callsites to |
Sure, gonna update it there too, thanks! |
Relay: facebook/relay#2550 |
Summary: A while back Jest introduced `jest.requireActual` and `jest.requireMock` which are aliases to `require.requireActual` and `require.requireMock`. We believe that users should use official Jest API and are planning to deprecate the latter. Pull Request resolved: facebook/react-native#21849 Differential Revision: D10448849 Pulled By: TheSavior fbshipit-source-id: 34fffde97f48c26098c74ee222a56d99071703a6
…ook#21849) Summary: A while back Jest introduced `jest.requireActual` and `jest.requireMock` which are aliases to `require.requireActual` and `require.requireMock`. We believe that users should use official Jest API and are planning to deprecate the latter. Pull Request resolved: facebook#21849 Differential Revision: D10448849 Pulled By: TheSavior fbshipit-source-id: 34fffde97f48c26098c74ee222a56d99071703a6
A while back Jest introduced
jest.requireActual
andjest.requireMock
which are aliases torequire.requireActual
andrequire.requireMock
. We believe that users should use official Jest API and are planning to deprecate the latter.Test Plan:
Only Jest-related changes, CI should be green.
Release Notes:
[GENERAL] [ENHANCEMENT] [tests] - Use requireActual and requireMock from jest object instead of require.