Skip to content

Commit

Permalink
Skip react-native example on Node 4.
Browse files Browse the repository at this point in the history
  • Loading branch information
cpojer committed Jul 26, 2016
1 parent 971781a commit c2b115c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scripts/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ const EXAMPLES_DIR = path.resolve(__dirname, '../examples');
const INTEGRATION_TESTS_DIR = path.resolve(__dirname, '../integration_tests');
const JEST_CLI_PATH = path.resolve(__dirname, '../packages/jest-cli');
const LINKED_MODULES = ['jest-react-native'];
const NODE_VERSION = Number(process.version.match(/^v(\d+\.\d+)/)[1]);
const SKIP_ON_OLD_NODE = ['react-native'];
const VERSION = require('../lerna').version;

const packages = getPackages();
Expand All @@ -45,6 +47,12 @@ function runPackageTests(packageDirectory) {
function runExampleTests(exampleDirectory) {
console.log(chalk.bold(chalk.cyan('Testing example: ') + exampleDirectory));

const exampleName = path.basename(exampleDirectory);
if (NODE_VERSION < 6 && SKIP_ON_OLD_NODE.indexOf(exampleName) !== -1) {
console.log(`Skipping ${exampleName} on node ${process.version}.`);
return;
}

runCommands('npm update', exampleDirectory);
packages.forEach(pkg => {
const name = path.basename(pkg);
Expand Down

0 comments on commit c2b115c

Please sign in to comment.