function test(configName, failOnError = true, karmaOptions = {}) {
  return done => new Karma(Object.assign({
    configFile: path.resolve(`test/karma-${configName}.config.babel.js`)
  }, karmaOptions), err => {
    if (err) {
      gutil.log('[test]', 'Tests failed');
      if (failOnError) {
        done(new gutil.PluginError('karma', 'Tests failed'));
      } else {
        done();
      }
    } else {
      done();
    }
  }).start();
}
/*.js',
  'test/random.js',
  'test/helpers.js',
  'test/generate_expected.phantom.js',
  'test/unit/**.js'
];

function build(config) {
  const basename = path.basename(config.output.filename, path.extname(config.output.filename));
  const jsOnly = filter(['*