module.exports = function (config) {
  config.set({
    browsers: [ 'ChromeCI' ],
    customLaunchers: {
      ChromeCI: {
        base: 'Chrome',
        flags: [
          '--headless',
          '--disable-gpu',
          '--no-sandbox',
          '--remote-debugging-port=9222'
        ]
      }
    },
    singleRun: true,
    // basePath: '',
    files: [
      {
        pattern: 'test_index.js', watched: false
      }
    ],
    frameworks: ['jasmine'],
    preprocessors: {
      'test_index.js': ['webpack', 'sourcemap']
    },
    webpack: {
      devtool: 'inline-source-map',
      module: {
        loaders: [
          {
            test: /\.js/,
            exclude: /node_modules/,
            loader: 'babel-loader'
          },
          {
            // That will tell Webpack that EaselJS refers to `window` with `this` and exports `window.createjs`.
            test: /easeljs\.js$/,
            loader: 'imports?this=>window!exports?window.createjs'
          }
        ]
      },
      watch: true
    },
    webpackServer: {
      noInfo: true
    }
  });
};