Skip to content

Commit

Permalink
Merge pull request #6052 from cpojer/master
Browse files Browse the repository at this point in the history
Update to jest-cli 0.9.
  • Loading branch information
cpojer committed Feb 17, 2016
2 parents 73ad445 + 383e2f9 commit 50c28fa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 19 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"gulp-babel": "^5.3.0",
"gulp-flatten": "^0.2.0",
"gzip-js": "~0.3.2",
"jest-cli": "^0.6.1",
"jest-cli": "^0.9.0-fb1",
"platform": "^1.1.0",
"run-sequence": "^1.1.4",
"through2": "^2.0.0",
Expand Down
18 changes: 1 addition & 17 deletions scripts/jest/preprocessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,26 +51,10 @@ module.exports = {
!filePath.match(/\/node_modules\//) &&
!filePath.match(/\/third_party\//)
) {
var rv = babel.transform(
return babel.transform(
src,
Object.assign({filename: filePath}, babelOptions)
).code;
// hax to turn fbjs/lib/foo into /path/to/node_modules/fbjs/lib/foo
// because jest is slooow with node_modules paths (facebook/jest#465)
rv = rv.replace(
/require\('(fbjs\/lib\/.+)'\)/g,
function(call, arg) {
return (
'require(' +
JSON.stringify(
path.join(__dirname, '../../node_modules', arg)
) +
')'
);
}
);

return rv;
}
return src;
},
Expand Down
2 changes: 1 addition & 1 deletion src/test/__tests__/ReactDefaultPerf-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('ReactDefaultPerf', function() {

beforeEach(function() {
var now = 0;
jest.setMock('performanceNow', function() {
jest.setMock('fbjs/lib/performanceNow', function() {
return now++;
});

Expand Down

0 comments on commit 50c28fa

Please sign in to comment.