<commit_before>chai     = require "chai"
Throttle    = require "../lib/throttle.js"

throttle = new Throttle( 1000 )
now = +( new Date() )

describe( "throttle", () ->
    describe( "#connect(1)", () ->
        it( "Should be immediate", ( testCompleted ) ->

            throttle.connect()
            .then(
                ( data ) ->
                    completed = +( new Date() )
                    delay     = completed - now

                    chai.expect( delay ).to.be.below( 500 )
                    testCompleted();
            )
            .done()
        )<commit_msg>Code layout<commit_after>chai     = require "chai"
Throttle = require "../lib/throttle.js"

throttle = new Throttle( 1000 )
now      = +( new Date() )

describe( "throttle", () ->
    describe( "#connect(1)", () ->
        it( "Should be immediate", ( testCompleted ) ->

            throttle.connect()
            .then(
                ( data ) ->
                    completed = +( new Date() )
                    delay     = completed - now

                    chai.expect( delay ).to.be.below( 500 )
                    testCompleted();
            )
            .done()
        )
{'fraction_non_alphanumeric': 0.141396933560477, 'fraction_numerical': 0.013628620102214651, 'mean_word_length': 1.2683397683397684, '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': '2601865', 'n_tokens_mistral': 356, 'n_tokens_neox': 326, 'n_words': 75}