rickvanlieshout.com/jest/jest-preprocess.js

17 lines
357 B
JavaScript
Raw Normal View History

2018-11-09 18:08:48 +01:00
'use strict';
const babelOptions = {
presets: [
'@babel/react',
'@babel/env',
'babel-preset-gatsby'
],
2018-11-09 18:08:48 +01:00
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);