<commit_before>var assert = require('assert');
var download = require('../src/download');

describe('Download', function() {
        it('downloads sample http file', function(done) {
            download.start('http://www.brainjar.com/java/host/test.html',process.cwd() + DOWNLOAD_DIR + '/test.html', LOG_OUTPUT, function(succes){
                assert(succes,"failed to download bing.com, please check internet connectivity");
                done();
            });
        });
        it('doesn\'t work when there is no uri', function() {
            assert.throws(function(){ 
                download.start(null,process.cwd() + DOWNLOAD_DIR + '/bing.html', LOG_OUTPUT, function(succes){
                    assert(false,"failed to download bing.com");
                    done();
                });
            }, Error,'download allowed a download without uri');
            assert.throws(function(){ 
                download.start('',process.cwd() + DOWNLOAD_DIR + '/bing.html', LOG_OUTPUT, function(succes){
                    assert(false,"failed to download bing.com");
                    done();
                });
            }, Error,'download allowed a download without uri');
        });
        it('doesn\'t work when there is no file path', function() {
            assert.throws(function(){ 
                download.start('https://bing.com/',null, LOG_OUTPUT, function(succes){
                    assert(false,"failed to download bing.com");
                    done();
                });
            }, Error,'download allowed a download without uri');
            assert.throws(function(){ 
                download.start('https://bing.com/','', LOG_OUTPUT, function(succes){
                    assert(false,"failed to download bing.com");
                    done();
                });
            }, Error,'download allowed a download without uri');
        });
    });<commit_msg>All tests passing again after refactor<commit_after>var assert = require('assert');
var download = require('../src/download');

describe('Download', function() {
        var downloadPath = '\\test\\downloads'
        it('downloads sample http file', function(done) {
            download.start('http://www.brainjar.com/java/host/test.html',process.cwd() + downloadPath + '/test.html', false, function(succes){
                assert(succes,"failed to download bing.com, please check internet connectivity");
                done();
            });
        });
        it('doesn\'t work when there is no uri', function() {
            assert.throws(function(){ 
                download.start(null,process.cwd() + downloadPath + '/bing.html', false, function(succes){
                    assert(false,"failed to download bing.com");
                    done();
                });
            }, Error,'download allowed a download without uri');
            assert.throws(function(){ 
                download.start('',process.cwd() + downloadPath + '/bing.html', false, function(succes){
                    assert(false,"failed to download bing.com");
                    done();
                });
            }, Error,'download allowed a download without uri');
        });
        it('doesn\'t work when there is no file path', function() {
            assert.throws(function(){ 
                download.start('https://bing.com/',null, false, function(succes){
                    assert(false,"failed to download bing.com");
                    done();
                });
            }, Error,'download allowed a download without uri');
            assert.throws(function(){ 
                download.start('https://bing.com/','', false, function(succes){
                    assert(false,"failed to download bing.com");
                    done();
                });
            }, Error,'download allowed a download without uri');
        });
    });
{'fraction_non_alphanumeric': 0.14270967741935484, 'fraction_numerical': 0.0, 'mean_word_length': 1.8291970802919708, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 49, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4081940', 'n_tokens_mistral': 969, 'n_tokens_neox': 897, 'n_words': 224}