From 681a463240550b337aacaa889d7b240045439e1b Mon Sep 17 00:00:00 2001 From: cpojer Date: Thu, 28 Apr 2016 16:08:20 +0900 Subject: [PATCH] =?UTF-8?q?Update=20Jest=E2=80=99s=20grunt=20task.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- grunt/tasks/jest.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/grunt/tasks/jest.js b/grunt/tasks/jest.js index fb8c1113ab..fddabd1a3d 100644 --- a/grunt/tasks/jest.js +++ b/grunt/tasks/jest.js @@ -1,9 +1,3 @@ -// We run our own grunt task instead of using grunt-jest so that we can have -// more control. Specifically we want to set NODE_ENV and make sure stdio is -// inherited. We also run with --harmony directly so that we don't have to -// respawn immediately. We should be able to reduce some of this complexity -// when jest 0.5 is run on top of iojs. - 'use strict'; var async = require('async'); @@ -52,8 +46,10 @@ function getJestConfig(callback) { getCollectCoverageOnlyFrom(function(err, data) { callback(err, Object.assign({}, config, { rootDir: rootDir, + name: 'react', collectCoverage: true, collectCoverageOnlyFrom: data, + watchman: false, })); }); } @@ -75,9 +71,9 @@ function writeTempConfig(callback) { } function run(done, configPath) { - grunt.log.writeln('running jest (this may take a while)'); + grunt.log.writeln('running jest'); - var args = ['--harmony', path.join('node_modules', 'jest-cli', 'bin', 'jest'), '--runInBand']; + var args = [path.join('node_modules', 'jest-cli', 'bin', 'jest'), '--runInBand']; if (configPath) { args.push('--config', configPath); }