<commit_before>var assign = require('lodash/object/assign');
var galv = require('galvatron');
var gulp = require('gulp');
var gulpBabel = require('gulp-babel');
var gulpConcat = require('gulp-concat');
var gulpKarma = require('gulp-karma');

module.exports = function (opts) {
  var args = [];
  opts = assign(opts, {
    browsers: ['Firefox']
  });

  if (opts.grep) {
    args.push('--grep');
    args.push(opts.grep);
  }

  return gulp.src('test/unit.js')
    .pipe(galv.trace())
    .pipe(galv.cache('babel', gulpBabel()))
    .pipe(galv.cache('globalize', galv.globalize()))
    .pipe(gulpConcat('unit.js'))
    .pipe(gulp.dest('.tmp'))
    .pipe(gulpKarma({
      autoWatch: opts.watch,
      browsers: opts.browsers,
      client: { args: args },
      frameworks: ['mocha', 'sinon-chai']
    }));
};<commit_msg>Fix test script so you can override the --browsers option.<commit_after>var assign = require('lodash/object/assign');
var galv = require('galvatron');
var gulp = require('gulp');
var gulpBabel = require('gulp-babel');
var gulpConcat = require('gulp-concat');
var gulpKarma = require('gulp-karma');

module.exports = function (opts) {
  var args = [];
  opts = assign({
    browsers: 'Chrome,Firefox'
  }, opts);

  if (opts.grep) {
    args.push('--grep');
    args.push(opts.grep);
  }

  return gulp.src('test/unit.js')
    .pipe(galv.trace())
    .pipe(galv.cache('babel', gulpBabel()))
    .pipe(galv.cache('globalize', galv.globalize()))
    .pipe(gulpConcat('unit.js'))
    .pipe(gulp.dest('.tmp'))
    .pipe(gulpKarma({
      autoWatch: opts.watch,
      browsers: opts.browsers.split(','),
      client: { args: args },
      frameworks: ['mocha', 'sinon-chai']
    }));
};
{'fraction_non_alphanumeric': 0.19988242210464433, 'fraction_numerical': 0.0, 'mean_word_length': 3.575268817204301, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5729122', 'n_tokens_mistral': 641, 'n_tokens_neox': 628, 'n_words': 112}