From cbd836118fefc57b88679aa192248f831c68babf Mon Sep 17 00:00:00 2001 From: pangxie1991 Date: Fri, 3 Mar 2017 16:01:45 +0800 Subject: [PATCH] unit test config --- package.json | 6 ++++++ test/unit/karma.conf.js | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/package.json b/package.json index 1d2b1a047..4c1e90573 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,7 @@ "babel-plugin-syntax-jsx": "^6.18.0", "babel-plugin-transform-runtime": "^6.15.0", "babel-plugin-transform-vue-jsx": "^3.3.0", + "babel-polyfill": "^6.23.0", "babel-preset-es2015": "^6.16.0", "babel-runtime": "^6.11.0", "cheerio": "^0.22.0", @@ -86,6 +87,11 @@ "karma": "^1.5.0", "karma-chrome-launcher": "^2.0.0", "karma-coverage": "^1.1.1", + "karma-mocha": "^1.3.0", + "karma-sinon-chai": "^1.2.4", + "karma-sourcemap-loader": "^0.3.7", + "karma-spec-reporter": "0.0.30", + "karma-webpack": "^2.0.2", "lerna": "2.0.0-beta.31", "lolex": "^1.5.1", "markdown-it": "^6.1.1", diff --git a/test/unit/karma.conf.js b/test/unit/karma.conf.js index ab02fe3d7..c2cd1e3df 100644 --- a/test/unit/karma.conf.js +++ b/test/unit/karma.conf.js @@ -1,3 +1,9 @@ +require('babel-polyfill'); + +require('babel-core/register')({ + presets: [require('babel-preset-es2015')] +}); + var webpackConfig = require('./get-webpack-conf'); module.exports = function(config) {