github.com/titpetric/pendulum@v0.1.180207-1512.0.20180514135826-1f399445df57/front/src/test/unit/karma.conf.js (about) 1 // This is a karma config file. For more details see 2 // http://karma-runner.github.io/0.13/config/configuration-file.html 3 // we are also using it with karma-webpack 4 // https://github.com/webpack/karma-webpack 5 6 var webpackConfig = require('../../build/webpack.test.conf') 7 8 module.exports = function (config) { 9 config.set({ 10 // to run in additional browsers: 11 // 1. install corresponding karma launcher 12 // http://karma-runner.github.io/0.13/config/browsers.html 13 // 2. add it to the `browsers` array below. 14 browsers: ['PhantomJS'], 15 frameworks: ['mocha', 'sinon-chai', 'phantomjs-shim'], 16 reporters: ['spec', 'coverage'], 17 files: ['./index.js'], 18 preprocessors: { 19 './index.js': ['webpack', 'sourcemap'] 20 }, 21 webpack: webpackConfig, 22 webpackMiddleware: { 23 noInfo: true 24 }, 25 coverageReporter: { 26 dir: './coverage', 27 reporters: [ 28 { type: 'lcov', subdir: '.' }, 29 { type: 'text-summary' } 30 ] 31 } 32 }) 33 }