<commit_before>'use strict';

var getFileUrl = require('../getfileurl')
  , assert = require('assert')
  ;

describe('Slurper - outputs', function(){

  it('Should throw if file url is not found', function(done){

    var opts = {url:'http://www.google.com', id:'#megaman'};

    getFileUrl(opts, function(err, data){
      assert.throws(function(){
          if(err) throw err;
        }, function(err){
          if((err instanceof Error) && /File url not found/.test(err)){
            return true
          }
        },
        "Unexpected error"
      );
      done();
    });

  });

  it('Should return a file url', function(done){

    var opts = {url:'http://www.dagbladet.no/tegneserie/lunch/', id:'#lunch-stripe'};

    getFileUrl(opts, function(err, data){
      if(err){
        throw err;
      }
      assert(data);
      done();
    });

  });

});<commit_msg>Changes url for test<commit_after>'use strict';

var getFileUrl = require('../getfileurl')
  , assert = require('assert')
  ;

describe('Slurper - outputs', function(){

  it('Should throw if file url is not found', function(done){

    var opts = {url:'https://www.npmjs.org', id:'#megaman'};

    getFileUrl(opts, function(err, data){
      assert.throws(function(){
          if(err) throw err;
        }, function(err){
          if((err instanceof Error) && /File url not found/.test(err)){
            return true
          }
        },
        "Unexpected error"
      );
      done();
    });

  });

  it('Should return a file url', function(done){

    var opts = {url:'http://www.dagbladet.no/tegneserie/lunch/', id:'#lunch-stripe'};

    getFileUrl(opts, function(err, data){
      if(err){
        throw err;
      }
      assert(data);
      done();
    });

  });

});
{'fraction_non_alphanumeric': 0.17509948834565095, 'fraction_numerical': 0.0, 'mean_word_length': 2.346007604562738, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 4, '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': '7178999', 'n_tokens_mistral': 574, 'n_tokens_neox': 551, 'n_words': 125}