react-native/local-cli/core
Jean Lauliac e327f88f02 react-native: make automated fs-based tests platform-independent
Summary:
@public

These tests are using a mock memory FS to start with, so there is no reason at all they should depend on the host OS or filesystem details. This changeset fixes that so that we fully mock the `fs` and `path` modules dependending on the mock platform (not the host platform). I also added an example of how we can test both platforms (regardless of the host platform) in `findPackageClassName`. Follow up changeset will be to do the same for all the other affected tests.

Related to https://github.com/facebook/react-native/issues/20260.

Reviewed By: mjesun

Differential Revision: D9771024

fbshipit-source-id: b368b43e8e54292d33b6183eec9a9ea69f2e6e76
2018-09-17 05:46:47 -07:00
..
__fixtures__ react-native: make automated fs-based tests platform-independent 2018-09-17 05:46:47 -07:00
__tests__ react-native: make automated fs-based tests platform-independent 2018-09-17 05:46:47 -07:00
android Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
ios Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
Constants.js Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
findAssets.js Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
findPlugins.js Give RNPM the ability to look for plugins in `@scoped` modules (#21082) 2018-09-13 04:31:38 -07:00
index.js Give RNPM the ability to look for plugins in `@scoped` modules (#21082) 2018-09-13 04:31:38 -07:00
makeCommand.js Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
wrapCommands.js Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00