[react-packager] Fix jest tests
This commit is contained in:
parent
6687c84467
commit
cf7d196c45
|
@ -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) {
|
||||
|
|
|
@ -8,12 +8,15 @@
|
|||
},
|
||||
"jest": {
|
||||
"scriptPreprocessor": "jestSupport/scriptPreprocess.js",
|
||||
"setupEnvScriptFile": "jestSupport/env.js",
|
||||
"testPathIgnorePatterns": [
|
||||
"/node_modules/",
|
||||
"/packager/"
|
||||
"/node_modules/"
|
||||
],
|
||||
"testFileExtensions": [
|
||||
"js"
|
||||
],
|
||||
"unmockedModulePathPatterns": [
|
||||
"source-map"
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
{
|
||||
"name": "react-packager",
|
||||
"version": "0.1.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"jest": {
|
||||
"unmockedModulePathPatterns": [
|
||||
"source-map"
|
||||
],
|
||||
"testPathIgnorePatterns": [
|
||||
"JSAppServer/node_modules"
|
||||
]
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
var path = require('path');
|
||||
var version = require('../../package.json').version;
|
||||
var version = require('../../../../package.json').version;
|
||||
var tmpdir = require('os').tmpDir();
|
||||
var pathUtils = require('../fb-path-utils');
|
||||
var declareOpts = require('../lib/declareOpts');
|
||||
|
|
Loading…
Reference in New Issue