// Karma configuration
// Generated on Tue Sep 08 2015 19:27:24 GMT+0900 (JST)

module.exports = function (config) {
  var settings = {
    // base path that will be used to resolve all patterns (eg. files, exclude)
    basePath: '',

    // frameworks to use
    // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
    frameworks: ['mocha'],

    // list of files / patterns to load in the browser
    files: [
      '../test/specs/**/*.js'
    ],

    // list of files to exclude
    exclude: [
    ],

    // preprocess matching files before serving them to the browser
    // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
    preprocessors: {
      '../src/**/*.js': ['webpack', 'sourcemap'],
      '../test/**/*.js': ['webpack', 'sourcemap']
    },

    webpack: {
      devtool: 'inline-source-map',
      module: {
        loaders: [{
          test: /\.js$/,
          exclude: /node_modules/,
          loader: 'babel',
          query: {
            plugins: ['babel-plugin-espower']
          }
        }],
        postLoaders: [{
          test: /\.json$/,
          loader: 'json'
        }, {
          test: /\.js$/,
          exclude: /test|node_modules/,
          loader: 'istanbul-instrumenter'
        }]
      }
    },

    webpackMiddleware: {
      noInfo: true
    },

    webpack: {
      module: {
        loaders: [{
          test: /\.js$/,
          loader: 'webpack-espower-loader'
        }, {
          test: /\.json$/,
          loader: 'json'
        }],
        postLoaders: [{
          test: /\.js$/,
          exclude: /(test|node_modules)\//,
          loader: 'istanbul-instrumenter'
        }]
      },
      devtool: 'inline-source-map'
    },

    webpackMiddleware: {
      noInfo: true
    },
    
    // web server port
    port: 9876,

    // enable / disable colors in the output (reporters and logs)
    colors: true,

    // level of logging
    // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
    logLevel: config.LOG_INFO,

    // enable / disable watching file and executing tests whenever any file changes
    autoWatch: true,

    // Continuous Integration mode
    // if true, Karma captures browsers, runs the tests and exits
    singleRun: true
  }

  switch (process.env.VUE_VALIDATOR_TYPE) {
    case 'coverage':
      settings.browsers = ['PhantomJS']
      settings.reporters = ['coverage']
      settings.coverageReporter = {
        reporters: [{
          type: 'html', dir: '../coverage'
        }, {
          type: 'text-summary', dir: '../coverage'
        }]
      }
      break
    case 'coveralls':
      settings.browsers = ['PhantomJS']
      settings.reporters = ['coverage', 'coveralls']
      settings.coverageReporter = {
        reporters: [{ type: 'lcov', dir: '../coverage' }]
      }
      break
    case 'sauce':
      var batch = process.env.SAUCE || 'batch1'
      var sauce = require('./sauce')[batch]
      settings.sauceLabs = sauce.sauceLabs
      settings.captureTimeout = sauce.captureTimeout
      settings.customLaunchers = sauce.customLaunchers
      settings.browsers = sauce.browsers
      settings.reporters = sauce.reporters
      break
    case 'browser':
      settings.browsers = ['Chrome', 'Safari', 'Firefox']
      settings.reporters = ['progress']
      break
    default:
      settings.browsers = ['PhantomJS']
      settings.reporters = ['mocha']
      break
  }


  config.set(settings)
}

@@ -1352,402 +1352,8 @@
 pack
-: %7B%0A      module: %7B%0A        loaders: %5B%7B%0A          test: /%5C.js$/,%0A          loader: 'webpack-espower-loader'%0A        %7D, %7B%0A          test: /%5C.json$/,%0A          loader: 'json'%0A        %7D%5D,%0A        postLoaders: %5B%7B%0A          test: /%5C.js$/,%0A          exclude: /(test%7Cnode_modules)%5C//,%0A          loader: 'istanbul-instrumenter'%0A        %7D%5D%0A      %7D,%0A      devtool: 'inline-source-map'%0A    %7D,%0A%0A    webpack
 Midd
@@ -1366,32 +1366,51 @@
 : %7B%0A      noInfo
+: true,%0A      quiet
 : true%0A    %7D,%0A  

Update karma configration