[react-packager] Fix jest tests

This commit is contained in:
Amjad Masad
2015-02-25 12:57:33 -08:00
parent 6687c84467
commit cf7d196c45
6 changed files with 15 additions and 17 deletions

5
jestSupport/env.js Normal file
View File

@@ -0,0 +1,5 @@
'use strict';
global.setImmediate = global.setImmediate || function(fn) {
return setTimeout(fn, 0);
};

View File

@@ -10,6 +10,10 @@ module.exports = {
transformSource: transformSource,
process: function(src, fileName) {
if (fileName.match(/node_modules/)) {
return src;
}
try {
return transformSource(src);
} catch(e) {