<commit_before>Queue = require 'queue-async'
es = require 'event-stream'

gulp = require 'gulp'
gutil = require 'gulp-util'
karma = require './karma/run'
mocha = require 'gulp-mocha'

module.exports = (callback) ->
  queue = new Queue(1)

  # run node tests
  queue.defer (callback) ->
    gutil.log 'Running Node.js tests'
    global.test_parameters = require '../test/parameters' # ensure that globals for the target backend are loaded
    gulp.src('test/spec/**/*.tests.coffee')
      .pipe(mocha({reporter: 'spec'}))
      .pipe es.writeArray (err, array) ->
        delete global.test_parameters # cleanup globals
        callback(err)

  # # run browser tests
  # queue.defer (callback) ->
  #   gutil.log 'Running Browser tests'
  #   karma(callback)

  queue.await callback<commit_msg>Put back all tests<commit_after>Queue = require 'queue-async'
es = require 'event-stream'

gulp = require 'gulp'
gutil = require 'gulp-util'
karma = require './karma/run'
mocha = require 'gulp-mocha'

module.exports = (callback) ->
  queue = new Queue(1)

  # run node tests
  queue.defer (callback) ->
    gutil.log 'Running Node.js tests'
    global.test_parameters = require '../test/parameters' # ensure that globals for the target backend are loaded
    gulp.src('test/spec/**/*.tests.coffee')
      .pipe(mocha({}))
      .pipe es.writeArray (err, array) ->
        delete global.test_parameters # cleanup globals
        callback(err)

  # run browser tests
  queue.defer (callback) ->
    gutil.log 'Running Browser tests'
    karma(callback)

  queue.await callback
{'fraction_non_alphanumeric': 0.13082322910019145, 'fraction_numerical': 0.0012763241863433313, 'mean_word_length': 3.2264150943396226, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '2095797', 'n_tokens_mistral': 512, 'n_tokens_neox': 497, 'n_words': 137}