Merge pull request #6052 from cpojer/master

Update to jest-cli 0.9.
This commit is contained in:
Christoph Pojer
2016-02-17 15:44:28 +09:00
3 changed files with 3 additions and 19 deletions
+1 -1
View File
@@ -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",
+1 -17
View File
@@ -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;
},
+1 -1
View File
@@ -24,7 +24,7 @@ describe('ReactDefaultPerf', function() {
beforeEach(function() {
var now = 0;
jest.setMock('performanceNow', function() {
jest.setMock('fbjs/lib/performanceNow', function() {
return now++;
});