Update Jest’s grunt task.
cpojer committed
Apr 28, 2016 at 16:08 UTC
681a463240550b337aacaa889d7b240045439e1b
1 file changed
+4
-8
grunt/tasks/jest.js
+4
-8
@@ -1,9 +1,3 @@
1
-// We run our own grunt task instead of using grunt-jest so that we can have
2
-// more control. Specifically we want to set NODE_ENV and make sure stdio is
3
-// inherited. We also run with --harmony directly so that we don't have to
4
-// respawn immediately. We should be able to reduce some of this complexity
5
-// when jest 0.5 is run on top of iojs.
6
-
1
'use strict';
2
3
var async = require('async');
@@ -52,8 +46,10 @@ function getJestConfig(callback) {
46
getCollectCoverageOnlyFrom(function(err, data) {
47
callback(err, Object.assign({}, config, {
48
rootDir: rootDir,
49
+ name: 'react',
50
collectCoverage: true,
51
collectCoverageOnlyFrom: data,
52
+ watchman: false,
53
}));
54
});
55
}
@@ -75,9 +71,9 @@ function writeTempConfig(callback) {
71
}
72
73
function run(done, configPath) {
78
- grunt.log.writeln('running jest (this may take a while)');
74
+ grunt.log.writeln('running jest');
75
80
- var args = ['--harmony', path.join('node_modules', 'jest-cli', 'bin', 'jest'), '--runInBand'];
76
+ var args = [path.join('node_modules', 'jest-cli', 'bin', 'jest'), '--runInBand'];
77
if (configPath) {
78
args.push('--config', configPath);
79
}