Created
March 5, 2015 13:58
-
-
Save tomatau/38ef416fbca4c9f31d8f to your computer and use it in GitHub Desktop.
Object.getPrototypeOf === undefined
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Jest Config **/ | |
"jest": { | |
"globals": { | |
"__DEV__": true, | |
"__TEST__": true | |
}, | |
"testDirectoryName": "app/tests", | |
"testFileExtensions": [ | |
"es6" | |
], | |
"setupTestFrameworkScriptFile": "jest/setup.js", | |
"modulePathIgnorePatterns": [ | |
"app/dist", | |
"bin", | |
"webpack" | |
], | |
"moduleFileExtensions": [ | |
"js", | |
"jsx", | |
"es6" | |
], | |
"scriptPreprocessor": "jest/script-preprocessor.js", | |
"unmockedModulePathPatterns": [ | |
"path", | |
"events", | |
"node_modules/wizenoze-core/flux", | |
"node_modules/react", | |
"node_modules/react-bootstrap", | |
"node_modules/mcfly", | |
"node_modules/counterpart", | |
"node_modules/lodash", | |
"node_modules/keymirror", | |
"node_modules/es6-promise", | |
"node_modules/jasmine-spec-reporter" | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** script-preprocessor.js */ | |
var ReactTools = require('react-tools'); | |
var to5 = require("babel-core"); | |
module.exports = { | |
process: function(src, path) { | |
[ | |
/react-fa/, | |
/\.jsx$/ | |
].forEach(function(regex){ | |
if( path.match(regex) ) src = ''; | |
}); | |
if (src !== '' && path.match(/\.es6$/)) { | |
src = to5.transform(src, { | |
filename: path, | |
experimental: true, | |
optional: ['runtime'], | |
ignore: false | |
}).code; | |
} | |
return src | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment