react-native/local-cli
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
..
__mocks__ react-native: make automated fs-based tests platform-independent 2018-09-17 05:46:47 -07:00
bundle Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
core react-native: make automated fs-based tests platform-independent 2018-09-17 05:46:47 -07:00
dependencies Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
eject Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
generator Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
info Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
init Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
install Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
library Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
link react-native: make automated fs-based tests platform-independent 2018-09-17 05:46:47 -07:00
logAndroid Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
logIOS Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
runAndroid Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
runIOS Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
server Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
templates bump android target version to 27 (#20843) 2018-09-15 05:47:09 -07:00
upgrade Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
util react-native: make automated fs-based tests platform-independent 2018-09-17 05:46:47 -07:00
.npmignore npmignore: ignore tests and fixtures 2018-02-27 08:42:14 -08:00
cli.js Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
cliEntry.js Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
commands.js Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
setup_env.bat Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
setup_env.sh Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
wrong-react-native.js Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00