diff --git a/karma.conf.js b/karma.conf.js index 2e61264..829e398 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -3,26 +3,13 @@ var test = path.join(process.cwd(), 'specs/main.js'); module.exports = function(config) { var conf = { - basePath: '', - frameworks: ['mocha', 'browserify'], - - files: [ - test - ], - - exclude: [], - - preprocessors: { + frameworks: ['mocha'], - }, + files: [test], - browserify: { - transform: ['envify', 'reactify'], - watch: true, - debug: true - }, + preprocessors: {}, reporters: ['progress'], @@ -38,10 +25,29 @@ module.exports = function(config) { captureTimeout: 60000, - singleRun: false + singleRun: false, + + webpack: { + cache: true, + module: { + loaders: [ + { + test: /\.js$/, + exclude: /node_modules/, + loader: path.resolve(process.env.RACKT_PATH, 'node_modules/babel-loader') + } + ] + } + }, + + webpackServer: { + stats: { + colors: true + } + } }; - conf.preprocessors[test] = ['browserify']; + conf.preprocessors[test] = ['webpack']; config.set(conf); }; diff --git a/package.json b/package.json index 4c1ffee..436f546 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,6 @@ "babel-core": "^5.5.6", "babel-loader": "^5.1.4", "karma": "^0.12.36", - "karma-browserify": "^4.2.1", "karma-chrome-launcher": "^0.1.12", "karma-cli": "0.0.4", "karma-firefox-launcher": "^0.1.6", @@ -32,6 +31,7 @@ "karma-opera-launcher": "^0.1.0", "karma-phantomjs-launcher": "^0.2.0", "karma-safari-launcher": "^0.1.1", + "karma-webpack": "^1.5.1", "minimist": "^1.1.1", "mocha": "^2.2.5", "react": "^0.13.3",