mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-12 09:20:14 +08:00
[react-packager] Fix jest tests
This commit is contained in:
5
jestSupport/env.js
Normal file
5
jestSupport/env.js
Normal file
@@ -0,0 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
global.setImmediate = global.setImmediate || function(fn) {
|
||||
return setTimeout(fn, 0);
|
||||
};
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user