<commit_before>var url = typeof window === 'undefined' ? 'http://example.org' : location.href;
var httpinvoke = require('../httpinvoke-node');

describe('Simplest GET invocation', function() {
    this.timeout(10000);
    it('calls "finished" exactly once', function(done) {
        var count = 0;
        httpinvoke(url, {
            finished: function() {
                count += 1;
                if(count === 1) {
                    setTimeout(function() {
                        if(count > 1) {
                            return done(new Error('"finished" was called ' + count + ' times'));
                        }
                        done();
                    }, 3000);
                }
            }
        });
    });
});
<commit_msg>finishedSpec: update description texts<commit_after>var url = typeof window === 'undefined' ? 'http://example.org' : location.href;
var httpinvoke = require('../httpinvoke-node');

describe('"finished" option', function() {
    this.timeout(10000);
    it('is called exactly once', function(done) {
        var count = 0;
        httpinvoke(url, {
            finished: function() {
                count += 1;
                if(count === 1) {
                    setTimeout(function() {
                        if(count > 1) {
                            return done(new Error('"finished" was called ' + count + ' times'));
                        }
                        done();
                    }, 3000);
                }
            }
        });
    });
});

{'fraction_non_alphanumeric': 0.1407068062827225, 'fraction_numerical': 0.017015706806282723, 'mean_word_length': 1.3272450532724505, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6303954', 'n_tokens_mistral': 408, 'n_tokens_neox': 367, 'n_words': 86}