rickvanlieshout.com/tests/jest-preprocess.js

13 lines
318 B
JavaScript
Raw Normal View History

2018-11-09 18:08:48 +01:00
'use strict';
const babelOptions = {
presets: ['@babel/react', '@babel/env'],
plugins: [
'@babel/plugin-proposal-optional-chaining',
2019-04-08 17:53:56 +02:00
'@babel/plugin-proposal-class-properties',
'@babel/plugin-transform-flow-strip-types',
2018-11-09 18:08:48 +01:00
],
};
2019-04-08 17:53:56 +02:00
module.exports = require('babel-jest').createTransformer(babelOptions);