Adding jest and jest babel preset to the react-native init command

Summary:
Adding jest and its presets to the react-native init command

**Test plan (required)**
run react-native init foo (using `npm link` to use the local `react-native` version)
inside foo there are now a .babelrc file and the package.json is set up as described by
https://facebook.github.io/jest/docs/tutorial-react-native.html#setup
Closes https://github.com/facebook/react-native/pull/9719

Differential Revision: D3843037

Pulled By: bestander

fbshipit-source-id: 004e27ebd3f257a202ed43f378d6fe6cc23ced52
This commit is contained in:
kentaromiura
2016-09-09 17:32:20 -07:00
committed by Facebook Github Bot 7
parent d6fe78fc25
commit 8689b0f21c
7 changed files with 75 additions and 4 deletions

View File

@@ -200,6 +200,11 @@ try {
exitCode = 1;
throw Error(exitCode);
}
if (exec(`npm test`).code) {
echo('Jest test failure');
exitCode = 1;
throw Error(exitCode);
}
}
exitCode = 0;