Skip to content

Commit

Permalink
Merge pull request facebook#94 from dforsten/master
Browse files Browse the repository at this point in the history
Support custom config on running tests as well (e.g. for decorators)
  • Loading branch information
kitze authored Aug 17, 2017
2 parents 468cebb + c402e1a commit 19fe8e1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/react-scripts/config/jest/babelTransform.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,15 @@
'use strict';

const babelJest = require('babel-jest');
const getCustomConfig = require('../custom-react-scripts/config');

//Get custom configuration for injecting plugins, presets and loaders
const customConfig = getCustomConfig(true);

module.exports = babelJest.createTransformer({
presets: [require.resolve('babel-preset-react-app')],
presets: [require.resolve('babel-preset-react-app')].concat(
customConfig.babelPresets
),
babelrc: false,
plugins: customConfig.babelPlugins,
});

0 comments on commit 19fe8e1

Please sign in to comment.