summaryrefslogtreecommitdiff
path: root/config/karma.config.js
blob: b317c3f00b236a6989bc6d4eb0de432f86c7f9e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
var path = require('path');
var webpackConfig = require('./webpack.config.js');
var ROOT_PATH = path.resolve(__dirname, '..');

// Karma configuration
module.exports = function(config) {
  config.set({
    basePath: ROOT_PATH,
    frameworks: ['jasmine'],
    files: [
      'spec/javascripts/test_bundle.js',
      { pattern: 'spec/javascripts/fixtures/**/*@(.json|.html|.html.raw)', included: false },
    ],
    preprocessors: {
      'spec/javascripts/**/*.js?(.es6)': ['webpack'],
    },
    webpack: webpackConfig,
    webpackMiddleware: { stats: 'errors-only' },
  });
};