Skip to content

Commit

Permalink
Update all Jest packages to 17.x (facebook#8327)
Browse files Browse the repository at this point in the history
* Update all Jest packages to 17.x, cache babel-jest transforms

* Remove the caching

Looking at the other builds it doesn't seem to actually be that necessary.  The bottleneck is executors, not build time.

* Remove unnecessary package, fix fiber test runner

* Regenerate yarn lockfile
  • Loading branch information
Evan Scott authored and gaearon committed Nov 20, 2016
1 parent 501ac15 commit 77c890d
Show file tree
Hide file tree
Showing 4 changed files with 368 additions and 432 deletions.
2 changes: 1 addition & 1 deletion grunt/tasks/jest.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function run(done, coverage) {
grunt.log.writeln('running jest');

var args = [
path.join('node_modules', 'jest', 'bin', 'jest'),
path.join('node_modules', 'jest-cli', 'bin', 'jest'),
];
if (coverage) {
args.push('--coverage');
Expand Down
13 changes: 8 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"babel-cli": "^6.6.5",
"babel-core": "^6.0.0",
"babel-eslint": "^7.1.0",
"babel-jest": "17.0.2",
"babel-plugin-check-es2015-constants": "^6.5.0",
"babel-plugin-syntax-trailing-function-commas": "^6.5.0",
"babel-plugin-transform-class-properties": "^6.11.5",
Expand Down Expand Up @@ -61,10 +62,10 @@
"gulp-load-plugins": "^1.2.4",
"gulp-util": "^3.0.7",
"gzip-js": "~0.3.2",
"jest": "^15.1.1",
"jest-config": "^15.1.1",
"jest-jasmine2": "^15.1.1",
"jest-runtime": "^15.1.1",
"jest-cli": "17.0.2",
"jest-config": "^17.0.2",
"jest-jasmine2": "^17.0.2",
"jest-runtime": "^17.0.2",
"loose-envify": "^1.1.0",
"merge-stream": "^1.0.0",
"object-assign": "^4.1.0",
Expand Down Expand Up @@ -98,7 +99,9 @@
"/react/build/"
],
"rootDir": "",
"scriptPreprocessor": "scripts/jest/preprocessor.js",
"transform": {
".*": "scripts/jest/preprocessor.js"
},
"setupFiles": [
"scripts/jest/environment.js"
],
Expand Down
8 changes: 5 additions & 3 deletions scripts/fiber/record-tests
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ const fs = require('fs');
const os = require('os');
const path = require('path');

const SearchSource = require('jest').SearchSource;
const TestRunner = require('jest').TestRunner;
const SearchSource = require('jest-cli').SearchSource;
const TestRunner = require('jest-cli').TestRunner;
const TestWatcher = require('jest-cli/build/TestWatcher');

const createHasteContext = require('jest-runtime').createHasteContext;
const readConfig = require('jest-config').readConfig;
Expand Down Expand Up @@ -95,7 +96,8 @@ function runJest() {
getTestSummary: () => 'You did it!'
}
);
return runner.runTests(data.paths);
const watcher = new TestWatcher({isWatchMode: false});
return runner.runTests(data.paths, watcher);
});
});
});
Expand Down
Loading

0 comments on commit 77c890d

Please sign in to comment.