Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Explicitly separate mocked native modules from mocked JS modules (fac…
…ebook#24809) Summary: This commit more clearly defines the mocks RN sets up and uses paths instead of Haste names to define the mocks. The Jest setup script defined mocks for native modules (Obj-C, Java) and mocks for JS modules in the same data structure. This meant that some non-native modules (that is, JS modules) were in the `mockNativeModules` map -- this commit splits them out and mocks them in typical `jest.mock` fashion. Additionally, the setup script used to mock the modules using the Haste names. As one of the steps toward migrating to standard path-based imports, the setup script now mocks JS modules using paths (native modules don't need a Haste name nor path since they are just entries in `NativeModules`). This gets us closer to being able to remove `hasteImpl`. (Tracking in facebook#24772.) Also, this commit removes mocks that are not referenced anywhere in the RN and React repositories (grepped for the names and found no entries outside of the Jest setup scripts). [General] [Changed] - Explicitly separate mocked native modules from mocked JS modules Pull Request resolved: facebook#24809 Differential Revision: D15316882 Pulled By: cpojer fbshipit-source-id: 039e4e320121bea9580196fe0a091b8b1e8b41bf (cherry picked from commit 1ed3525)
- Loading branch information