diff --git a/package.json b/package.json index 96b9a7c92a..cf9a7c03c1 100644 --- a/package.json +++ b/package.json @@ -73,17 +73,21 @@ }, "devDependencies": { "autoprefixer-loader": "^3.1.0", - "babel": "^5.8.29", - "babel-core": "^5.8.29", - "babel-jest": "^5.3.0", - "babel-loader": "^5.3.2", + "babel-cli": "^6.2.0", + "babel-core": "^6.2.1", + "babel-jest": "^6.0.1", + "babel-loader": "^6.2.0", + "babel-plugin-add-module-exports": "^0.1.1", + "babel-preset-es2015": "^6.1.18", + "babel-preset-react": "^6.1.18", + "babel-preset-stage-0": "^6.1.18", "busboy": "^0.2.9", "chalk": "^1.1.0", "clipboard": "^1.5.5", "css-loader": "^0.23.0", "eslint": "^1.1.0", "eslint-config-airbnb": "^1.0.0", - "eslint-plugin-babel": "^2.1.1", + "eslint-plugin-babel": "^3.0.0", "eslint-plugin-markdown-antd": "0.0.0", "eslint-plugin-react": "^3.3.1", "expect.js": "~0.3.1", @@ -123,6 +127,7 @@ "beta": "sh ./scripts/publish.sh --tag beta" }, "jest": { + "testRunner": "/node_modules/jest-cli/src/testRunners/jasmine/jasmine2", "moduleFileExtensions": [ "js", "jsx", @@ -141,5 +146,15 @@ }, "pre-commit": [ "lint" - ] + ], + "babel": { + "presets": [ + "es2015", + "react", + "stage-0" + ], + "plugins": [ + "add-module-exports" + ] + } } diff --git a/tests/popover.test.js b/tests/popover.test.js index 1fe285f5ab..0fe9095d24 100644 --- a/tests/popover.test.js +++ b/tests/popover.test.js @@ -7,7 +7,7 @@ jest.dontMock('../components/popover/index'); const Popover = require('../components/popover/index'); describe('Popover', function() { - it.only('should show overlay when trigger is clicked', () => { + it('should show overlay when trigger is clicked', () => { const popover = TestUtils.renderIntoDocument( show me your code diff --git a/webpack.config.js b/webpack.config.js index 1357e0a92b..edf57d99f0 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -23,7 +23,11 @@ module.exports = { loaders: [{ test: /\.jsx?$/, exclude: /node_modules/, - loader: 'babel' + loader: 'babel', + query: { + presets: ['es2015', 'react', 'stage-0'], + plugins: ['add-module-exports'], + } }, { test: /\.json$/, loader: 'json-loader'