Add testing infrastructure using jest

Added simple test to illustrate how to use jest with react.
This commit is contained in:
Joey Payne 2016-03-03 14:32:30 -07:00
commit e53cbd0fc6
4 changed files with 58 additions and 15 deletions

12
jest/preprocessor.js Normal file
View file

@ -0,0 +1,12 @@
var babelJest = require('babel-jest');
var webpackAlias = require('jest-webpack-alias');
module.exports = {
process: function(src, filename) {
if (filename.indexOf('node_modules') === -1) {
src = babelJest.process(src, filename);
src = webpackAlias.process(src, filename);
}
return src;
}
};