Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This calls `react-native`'s Jest setup code before running its own. In particular, it seems to be aware of all the Expo modules we might want to add using `react-native-unimodules`, and mocks them [1]. Since we don't need our own mocks for these, remove them. It seems like we still need to add entries in our `transformModulesWhitelist`, ah, well. But it's good to weed out boring mocks from our `jestSetup.js`, and leave only those that are interesting [2]. Also, it seems like each time we add a module from Expo, there's a debugging process that can be confusing [3]; so, nice to avoid that. It looks like the preset does explicitly consider the bare, non-"managed" Expo workflow [4], which we use. 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. [1]: https://github.com/expo/expo/blob/b8bd30697/packages/jest-expo/src/preset/expoModules.js [2]: Seems like a few remain that aren't related to Expo. Hmm. [3]: https://github.com/zulip/zulip-mobile/pull/4034/files#r445956933 [4]: https://github.com/expo/expo/blob/b8bd30697/packages/jest-expo/src/preset/setup.js#L130
- Loading branch information