@samitouri / QOS-React-2 / commits / 383e2f938d

Update to jest-cli 0.9.

cpojer committed Feb 17, 2016 at 13:01 UTC 383e2f938d21fe3d402a931abd3057641d3e7961
3 files changed +3 -19
package.json
+1 -1
@@ -28,7 +28,7 @@
28 "gulp-babel": "^5.3.0",
29 "gulp-flatten": "^0.2.0",
30 "gzip-js": "~0.3.2",
31 - "jest-cli": "^0.6.1",
31 + "jest-cli": "^0.9.0-fb1",
32 "platform": "^1.1.0",
33 "run-sequence": "^1.1.4",
34 "through2": "^2.0.0",
scripts/jest/preprocessor.js
+1 -17
@@ -51,26 +51,10 @@ module.exports = {
51 !filePath.match(/\/node_modules\//) &&
52 !filePath.match(/\/third_party\//)
53 ) {
54 - var rv = babel.transform(
54 + return babel.transform(
55 src,
56 Object.assign({filename: filePath}, babelOptions)
57 ).code;
58 - // hax to turn fbjs/lib/foo into /path/to/node_modules/fbjs/lib/foo
59 - // because jest is slooow with node_modules paths (facebook/jest#465)
60 - rv = rv.replace(
61 - /require\('(fbjs\/lib\/.+)'\)/g,
62 - function(call, arg) {
63 - return (
64 - 'require(' +
65 - JSON.stringify(
66 - path.join(__dirname, '../../node_modules', arg)
67 - ) +
68 - ')'
69 - );
70 - }
71 - );
72 -
73 - return rv;
58 }
59 return src;
60 },
src/test/__tests__/ReactDefaultPerf-test.js
+1 -1
@@ -24,7 +24,7 @@ describe('ReactDefaultPerf', function() {
24
25 beforeEach(function() {
26 var now = 0;
27 - jest.setMock('performanceNow', function() {
27 + jest.setMock('fbjs/lib/performanceNow', function() {
28 return now++;
29 });
30