Skip to content
Snippets Groups Projects
karma.conf.js 1.43 KiB
Newer Older
  • Learn to ignore specific revisions
  • 'use strict';
    
    
    var webpackConfig = require('../../webpack.config');
    
    Tom Robinson's avatar
    Tom Robinson committed
    webpackConfig.module.postLoaders = [
    
        { test: /\.js$/, exclude: /(\.spec\.js|vendor|node_modules)/, loader: 'istanbul-instrumenter' }
    
    Tom Robinson's avatar
    Tom Robinson committed
    ];
    
    Tom Robinson's avatar
    Tom Robinson committed
    module.exports = function(config) {
        config.set({
    
    Tom Robinson's avatar
    Tom Robinson committed
            files: [
    
                '../resources/frontend_client/app/dist/vendor.bundle.js',
                '../resources/frontend_client/app/dist/app.bundle.js',
                '../node_modules/angular-mocks/angular-mocks.js',
    
    Tom Robinson's avatar
    Tom Robinson committed
            ],
            exclude: [
            ],
            preprocessors: {
    
    Tom Robinson's avatar
    Tom Robinson committed
            },
            frameworks: [
                'jasmine'
            ],
            reporters: [
                'progress',
                'coverage'
            ],
            webpack: {
                resolve: webpackConfig.resolve,
                module: webpackConfig.module
            },
            coverageReporter: {
    
                dir: '../coverage/',
    
    Tom Robinson's avatar
    Tom Robinson committed
                subdir: function(browser) {
                    return browser.toLowerCase().split(/[ /-]/)[0];
                },
                reporters: [
                    { type: 'text', file: 'text.txt' },
                    { type: 'text-summary', file: 'text-summary.txt' },
                    { type: 'html' }
                ]
            },
            port: 9876,
            colors: true,
            logLevel: config.LOG_INFO,
            browsers: ['Chrome'],
            autoWatch: true,
            singleRun: false
        });