Sha256: 129c042c832944808a31531c3fc5dc5e511e164c88bd03d9001561d119eddcd6

Contents?: true

Size: 1.19 KB

Versions: 2

Compression:

Stored size: 1.19 KB

Contents

var webpack = require('karma-webpack');
var webpackConfig = require('./webpack.config');
var path = require('path');
var webpackEntryFile = '../spec/javascripts/index.integration.js';
var karmaPreprocessors = {};

karmaPreprocessors[webpackEntryFile] = ['webpack', 'sourcemap'];

webpackConfig.entry = {
  test: path.resolve(__dirname, webpackEntryFile)
};

webpackConfig.devtool = 'inline-source-map';

module.exports = function(config) {
  config.set({
    browsers: ['PhantomJS'],
    port: 9876,
    basePath: '.',
    files: [
      // avoids running tests twice when on watch mode
      { pattern: webpackEntryFile, watched: false, included: true, served: true }
    ],
    preprocessors: karmaPreprocessors,
    frameworks: ['mocha', 'chai'],
    plugins: [
      webpack,
      'karma-mocha',
      'karma-chai',
      'karma-chrome-launcher',
      'karma-phantomjs-launcher',
      'karma-spec-reporter',
      'karma-sourcemap-loader'
    ],
    reporters: ['spec'],
    colors: true,
    logLevel: config.LOG_INFO,
    autoWatch: false,
    singleRun: true,
    webpack: webpackConfig,
    webpackMiddleware: {
      noInfo: true
    },
    phantomjsLauncher: {
      exitOnResourceError: true
    }
  });
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
code42template-2.1.0 templates/karma.conf.js
code42template-2.0.0 templates/karma.conf.js