From c01635e91bee53c61e45029900d04ca91add2106 Mon Sep 17 00:00:00 2001
From: Alf Eaton <eaton.alf@gmail.com>
Date: Wed, 23 Aug 2017 14:28:19 +0100
Subject: [PATCH] Use babel-preset-env and config instead of babelrc

---
 .babelrc                 | 6 ------
 package.json             | 6 ++++--
 test/config/transform.js | 7 +++++++
 3 files changed, 11 insertions(+), 8 deletions(-)
 delete mode 100644 .babelrc
 create mode 100644 test/config/transform.js

diff --git a/.babelrc b/.babelrc
deleted file mode 100644
index 2a4a32d91..000000000
--- a/.babelrc
+++ /dev/null
@@ -1,6 +0,0 @@
-{
-  "presets": [
-    "es2015",
-    "react"
-  ]
-}
\ No newline at end of file
diff --git a/package.json b/package.json
index 7c0d24f02..b48d1d650 100644
--- a/package.json
+++ b/package.json
@@ -22,7 +22,6 @@
     "babel-core": "^6.26.0",
     "babel-loader": "^7.1.2",
     "babel-jest": "^20.0.3",
-    "babel-preset-es2015": "^6.24.1",
     "babel-preset-env": "^1.6.0",
     "babel-preset-minify": "^0.2.0",
     "babel-preset-react": "^6.24.1",
@@ -41,7 +40,10 @@
   },
   "jest": {
     "moduleNameMapper": {
-      "\\.(css|less)$": "<rootDir>/test/setup/styleMock.js"
+      "\\.css$": "<rootDir>/test/setup/styleMock.js"
+    },
+    "transform": {
+      "\\.js$": "<rootDir>/test/config/transform.js"
     }
   },
   "scripts": {
diff --git a/test/config/transform.js b/test/config/transform.js
new file mode 100644
index 000000000..4fc948d1f
--- /dev/null
+++ b/test/config/transform.js
@@ -0,0 +1,7 @@
+module.exports = require('babel-jest').createTransformer({
+  presets: [
+    'env',
+    'react',
+    'stage-2'
+  ]
+});
-- 
GitLab