Fixing mocha tests

This commit is contained in:
Nicolas Gotchac 2016-11-26 17:27:44 +01:00
parent 44e099000d
commit f9b3a98ff7
3 changed files with 10 additions and 3 deletions

View File

@ -1,7 +1,6 @@
{ {
"presets": [ "presets": [
"es2017", "es2016", "es2017", "es2016", "es2015",
[ "es2015", { "modules": false } ],
"stage-0", "react" "stage-0", "react"
], ],
"plugins": [ "plugins": [

View File

@ -104,7 +104,7 @@
"postcss-loader": "~1.1.1", "postcss-loader": "~1.1.1",
"postcss-nested": "~1.0.0", "postcss-nested": "~1.0.0",
"postcss-simple-vars": "~3.0.0", "postcss-simple-vars": "~3.0.0",
"progress": "^1.1.8", "progress": "~1.1.8",
"raw-loader": "~0.5.1", "raw-loader": "~0.5.1",
"react-addons-perf": "~15.3.2", "react-addons-perf": "~15.3.2",
"react-addons-test-utils": "~15.3.2", "react-addons-test-utils": "~15.3.2",

View File

@ -26,6 +26,13 @@ const rucksack = require('rucksack-css');
const ENV = process.env.NODE_ENV || 'development'; const ENV = process.env.NODE_ENV || 'development';
const isProd = ENV === 'production'; const isProd = ENV === 'production';
function getBabelrc () {
const babelrc = require('../.babelrc');
const es2015Index = babelrc.presets.findIndex((p) => p === 'es2015');
babelrc.preset[es2015Index] = [ 'es2015', { modules: false } ];
return babelrc;
}
function getPlugins (_isProd = isProd) { function getPlugins (_isProd = isProd) {
const postcss = [ const postcss = [
postcssImport({ postcssImport({
@ -154,6 +161,7 @@ function addProxies (app) {
} }
module.exports = { module.exports = {
getBabelrc: getBabelrc,
getPlugins: getPlugins, getPlugins: getPlugins,
dappsEntry: getDappsEntry(), dappsEntry: getDappsEntry(),
addProxies: addProxies addProxies: addProxies