-
-
Notifications
You must be signed in to change notification settings - Fork 6.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
fix: remove require.requireActual
and require.requireMock
#9854
Conversation
e1ae49d
to
7f3cd83
Compare
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.
👍
@arty-name it has |
Wow, that's great news! Thanks! |
A reversion of e40c020 and 62621ef. Unfortunately, Jest 26 (the latest), which we'll take in an upcoming commit, doesn't support `jest-expo` at 37 [1]. We can't go past 37 (e.g., to 38.0.2, the latest) until we upgrade to React Native v0.62 (that's zulip#3782). That's because jest-expo's "react" peer dependency was bumped from ~16.9.0 to ~16.11.0 in expo/expo#8310 [2], and we must do that React upgrade atomically with our RN upgrade. The "react-native" peer dependency wasn't touched; it remained at "*". So, I'm left unsure whether it was intentional to drop support for RN v0.61 [3]. Ah well. As we were aware in e40c020: """ If `jest-expo` turns out to be buggy, or the dependency requirements get even more tangled or burdensome, we should feel free to abandon this effort; it's not terrible to have to add boring mocks. """ We may consider adding it back in as a followup to zulip#3782. Run our usual `yarn yarn-deduplicate && yarn`, as prompted by `tools/test deps`. [1] We get errors about jest-expo using `require.requireActual`, which was removed in jestjs/jest#9854, out in v26.0.0-alpha.0. [2] expo/expo@a4cabf30a#diff-4a85ebd1069aff25ee2e5f2b004281ccR33 [3] See react-native-webview/react-native-webview#1445.
A reversion of e40c020 and 62621ef. Unfortunately, Jest 26 (the latest), which we'll take in an upcoming commit, doesn't support `jest-expo` at 37 [1]. We can't go past 37 (e.g., to 38.0.2, the latest) until we upgrade to React Native v0.62 (that's zulip#3782). That's because jest-expo's "react" peer dependency was bumped from ~16.9.0 to ~16.11.0 in expo/expo#8310 [2], and we must do that React upgrade atomically with our RN upgrade. The "react-native" peer dependency wasn't touched; it remained at "*". So, I'm left unsure whether it was intentional to drop support for RN v0.61 [3]. Ah, well. As I said in e40c020: """ If `jest-expo` turns out to be buggy, or the dependency requirements get even more tangled or burdensome, we should feel free to abandon this effort; it's not terrible to have to add boring mocks. """ We may consider adding it back in as a followup to zulip#3782. Run our usual `yarn yarn-deduplicate && yarn`, as prompted by `tools/test deps`. [1] We get errors about jest-expo using `require.requireActual`, which was removed in jestjs/jest#9854, out in v26.0.0-alpha.0. [2] expo/expo@a4cabf30a#diff-4a85ebd1069aff25ee2e5f2b004281ccR33 [3] See react-native-webview/react-native-webview#1445.
A reversion of e40c020 and 62621ef. Unfortunately, Jest 26 (the latest), which we'll take in an upcoming commit, doesn't support `jest-expo` at 37 [1]. We can't go past 37 (e.g., to 38.0.2, the latest) until we upgrade to React Native v0.62 (that's zulip#3782). That's because jest-expo's "react" peer dependency was bumped from ~16.9.0 to ~16.11.0 in expo/expo#8310 [2], and we must do that React upgrade atomically with our RN upgrade. The "react-native" peer dependency wasn't touched; it remained at "*". So, I'm left unsure whether it was intentional to drop support for RN v0.61 [3]. Ah, well. As I said in e40c020: """ If `jest-expo` turns out to be buggy, or the dependency requirements get even more tangled or burdensome, we should feel free to abandon this effort; it's not terrible to have to add boring mocks. """ We may consider adding it back in as a followup to zulip#3782. Run our usual `yarn yarn-deduplicate && yarn`, as prompted by `tools/test deps`. [1] We get errors about jest-expo using `require.requireActual`, which was removed in jestjs/jest#9854, out in v26.0.0-alpha.0. [2] expo/expo@a4cabf30a#diff-4a85ebd1069aff25ee2e5f2b004281ccR33 [3] See react-native-webview/react-native-webview#1445.
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
It's been deprecated for a few years now, let's clean it up.
Might land the change todone_createJestObjectFor
on master separately, as it cleans up #9849 for the ESM code pathTest plan
Green CI