<commit_before>const expect = require('chai').expect
const timeThreshold = require('../..').rules.timeThreshold

suite('rules#timeThreshold', function () {
  test('options', function (done) {
    var opts = { duration: 50, threshold: 100 }
    var middleware = timeThreshold(opts)

    function period(next) {
      return function () {
        middleware(null, null, next)
      }
    }

    setTimeout(period(disabled), 0)
    setTimeout(period(disabled), 75)
    setTimeout(period(enabled), 120)
    setTimeout(period(enabled), 150)
    setTimeout(period(disabled), 180)
    setTimeout(period(disabled), 200)
    setTimeout(period(enabled), 290)
    setTimeout(done, 350)
<commit_msg>fix(test): increase timers in time threshold rule<commit_after>const expect = require('chai').expect
const timeThreshold = require('../..').rules.timeThreshold

suite('rules#timeThreshold', function () {
  test('options', function (done) {
    var opts = { duration: 50, threshold: 100 }
    var middleware = timeThreshold(opts)

    function period(next) {
      return function () {
        middleware(null, null, next)
      }
    }

    setTimeout(period(disabled), 0)
    setTimeout(period(disabled), 75)
    setTimeout(period(enabled), 150)
    setTimeout(period(disabled), 200)
    setTimeout(period(enabled), 300)
    setTimeout(done, 350)

{'fraction_non_alphanumeric': 0.13707865168539327, 'fraction_numerical': 0.03445692883895131, 'mean_word_length': 3.9298892988929888, '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': '4712198', 'n_tokens_mistral': 419, 'n_tokens_neox': 382, 'n_words': 88}