diff --git a/package.json b/package.json index fbc22a01b4..37bb432af1 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "pretest": "npm run lint", "test": "npm run karma -- --single-run", "debug-server": "node tasks/serve-lib.js", - "karma": "node tasks/test.js start test/karma.config.js", + "karma": "karma start test/karma.config.js", "transform-src": "jscodeshift --transform transforms/module.js src", "changecase-src": "node tasks/filename-case-from-module.js", "transform-examples": "jscodeshift --transform transforms/module.js examples", @@ -79,6 +79,7 @@ "karma-firefox-launcher": "^1.0.1", "karma-mocha": "^1.3.0", "karma-sauce-launcher": "^1.1.0", + "karma-webpack": "^2.0.4", "marked": "0.3.7", "metalsmith": "2.3.0", "metalsmith-layouts": "1.8.1", diff --git a/test/karma.config.js b/test/karma.config.js index de949f9bd2..8dfaae32fe 100644 --- a/test/karma.config.js +++ b/test/karma.config.js @@ -57,6 +57,9 @@ module.exports = function(karma) { '/rendering/': '/base/rendering/', '/spec/': '/base/spec/' }, + preprocessors: { + '**/*.js': ['webpack'] + }, reporters: ['progress'], coverageReporter: { reporters: [ @@ -69,6 +72,9 @@ module.exports = function(karma) { type: 'text-summary' // prints the textual summary to the terminal } ] + }, + webpackMiddleware: { + noInfo: true } });