local-cli/init/init.js
/**
 * Add Jest-related stuff to package.json, which was created by the react-native-cli.
 */
Add Jest-related stuff to package.json, which was created by the react-native-cli.
Add Jest - related stuff to package . json which was created by the react - native - cli .
function addJestToPackageJson(destinationRoot) {
  var packageJSONPath = path.join(destinationRoot, 'package.json');
  var packageJSON = JSON.parse(fs.readFileSync(packageJSONPath));
  packageJSON.scripts.test = 'jest';
  packageJSON.jest = {
    preset: 'react-native-macos'
  };
  fs.writeFileSync(packageJSONPath, JSON.stringify(packageJSON, null, 2));
}
function addJestToPackageJson ( destinationRoot ) { var packageJSONPath = path . join ( destinationRoot , 'package.json' ) ; var packageJSON = JSON . parse ( fs . readFileSync ( packageJSONPath ) ) ; packageJSON . scripts . test = 'jest' ; packageJSON . jest = { preset : 'react-native-macos' } ; fs . writeFileSync ( packageJSONPath , JSON . stringify ( packageJSON , null , 2 ) ) ; }
Add Jest-related stuff to package.json, which was created by the react-native-cli.
Add Jest - related stuff to package . json which was created by the react - native - cli .