karma.conf.js 992 B

123456789101112131415161718192021222324252627282930313233
  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. var webpackConfig = require('../../build/webpack.test.conf')
  6. module.exports = function (config) {
  7. config.set({
  8. // to run in additional browsers:
  9. // 1. install corresponding karma launcher
  10. // http://karma-runner.github.io/0.13/config/browsers.html
  11. // 2. add it to the `browsers` array below.
  12. browsers: ['PhantomJS'],
  13. frameworks: ['mocha', 'sinon-chai', 'phantomjs-shim'],
  14. reporters: ['spec', 'coverage'],
  15. files: ['./index.js'],
  16. preprocessors: {
  17. './index.js': ['webpack', 'sourcemap']
  18. },
  19. webpack: webpackConfig,
  20. webpackMiddleware: {
  21. noInfo: true
  22. },
  23. coverageReporter: {
  24. dir: './coverage',
  25. reporters: [
  26. { type: 'lcov', subdir: '.' },
  27. { type: 'text-summary' }
  28. ]
  29. }
  30. })
  31. }