diff --git a/jestSupport/env.js b/jestSupport/env.js deleted file mode 100644 index b5151ad6c..000000000 --- a/jestSupport/env.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Copyright (c) 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ -'use strict'; - -throw new Error( - 'React-Native and Jest should be tested together with the jest-react-native preset:' + - 'http://facebook.github.io/jest/docs/tutorial-react-native.html' -); diff --git a/local-cli/init/init.js b/local-cli/init/init.js index 5ade86637..e6a7e73df 100644 --- a/local-cli/init/init.js +++ b/local-cli/init/init.js @@ -32,7 +32,7 @@ function init(projectDir, argsOrName) { : [argsOrName].concat(process.argv.slice(4)); // argsOrName was e.g. 'AwesomeApp' // args array is e.g. ['AwesomeApp', '--verbose'] - if (!args || args.lentgh == 0) { + if (!args || args.length === 0) { console.error('react-native init requires a project name.'); return; } @@ -63,7 +63,7 @@ function generateProject(destinationRoot, newProjectName, options) { } const yarnVersion = - (!options['npm']) && + (!options.npm) && yarn.getYarnVersionIfAvailable() && yarn.isGlobalCliUsingYarn(destinationRoot); @@ -81,7 +81,9 @@ function generateProject(destinationRoot, newProjectName, options) { execSync(`npm install react@${reactVersion} --save --save-exact`); } if (!options['skip-jest']) { - const jestDeps = `jest babel-jest jest-react-native babel-preset-react-native react-test-renderer@${reactVersion}`; + const jestDeps = ( + `jest babel-jest babel-preset-react-native react-test-renderer@${reactVersion}` + ); if (yarnVersion) { console.log('Adding Jest...'); execSync(`yarn add ${jestDeps} --dev --exact`);