UNPKG

974 BJavaScriptView Raw
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
6var webpackConfig = require('../../build/webpack.test.conf')
7
8module.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'],
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}