const webpack = require('webpack');

module.exports = function (config) {
  config.set({
    basePath: '',
    frameworks: ['jasmine'],
    preprocessors: {
      'src/**/*.js': ['webpack', 'coverage', 'sourcemap'],
      'test/spec/**/*.js': ['webpack', 'sourcemap']
    },
    files: ['src/testception-spec.js'],
    webpack: {
      module: {
        loaders: [
          {
            test: /\.js$/,
            exclude: /node_modules/,
            loader: 'babel' // 'babel-loader' is also a legal name to reference
          },
          {
            test: /^(?!.*spec\.js?$).*\.js?$/,
            include: /src\//,
            loader: 'isparta'
          }
        ]
      },
      devtool: 'inline-source-map'
    },
    reporters: ['progress', 'coverage'],
    coverageReporter: {
      dir: 'coverage',
      subdir: '.',
      reporters: [
        { type: 'html' },
        { type: 'text-summary' }
      ]
    },
    port: 8080,
    runnerPort: 9100,
    colors: true,
    logLevel: config.LOG_INFO,
    autoWatch: false,
    browsers: ['PhantomJS'],
    captureTimeout: 5000,
    singleRun: true
  });
};

@@ -168,74 +168,69 @@
 /**/
-*.js': %5B'webpack', 'coverage', 'sourcemap'%5D,%0A      'test/spec/**/*
+testception.js': %5B'coverage'%5D,%0A      'src/**/testception-spec
 .js'
@@ -245,21 +245,8 @@
 ack'
-, 'sourcemap'
 %5D%0A  
@@ -447,60 +447,8 @@
 bel'
- // 'babel-loader' is also a legal name to reference
 %0A   
@@ -492,32 +492,23 @@
 t: /
-%5E(?!.*spec%5C.js?$).*
+testception
 %5C.js
-?
 $/,%0A
@@ -536,10 +536,8 @@
 /src
-%5C/
 /,%0A 
@@ -598,44 +598,8 @@
    %7D
-,%0A      devtool: 'inline-source-map'
 %0A   
@@ -790,24 +790,173 @@
 y' %7D%0A      %5D
+,%0A      check: %7B%0A        each: %7B%0A          statements: 100,%0A          branches: 100,%0A          functions: 100,%0A          lines: 100%0A        %7D%0A      %7D
 %0A    %7D,%0A    

Fix coverage and threshold checking