<commit_before>var
  expect  = require('chai').expect,
  fs      = require('fs'),
  scraper = require('../../bin/scrapers/cz_praha8_hazardous_waste.js');

describe('cz_praha8_hazardous_waste', function() {

  describe('parse()', function() {
    var body;
    // parse date is sensitive to current date since it is
    // guessing year from current date and input parameters
    before(function(done) {
      fs.readFile('test/data/nebezpecny_odpad_2016-04-10.html', 'utf8', function (err, data) {
        if (err) {
          console.error(err);
          return done(err);
        }
        body = data;
        done();
      });
    });

    it('should expose a function', function () {
      expect(scraper.parse).to.be.a('function');
    });

    it('should parse all rows', function(done) {
      scraper.parse(body, function(err, res){
        if (err) return done(err);
        expect(res).to.have.length(181);
        done();
      });
    });

    it('should parse row correctly', function(done) {
      scraper.parse(body, function(err, res){
        if (err) return done(err);
        expect(res[0].place_name).to.equal('křižovatka ul. Prosecká – Pod Labuťkou');
        expect(res[0].time_from).to.eql(new Date(2016, 3, 27, 15, 0));
        expect(res[0].time_to).to.eql(new Date(2016, 3, 27, 15, 20));
        expect(res[0].container_type || scraper.containerType).to.equal('HAZARDOUS_WASTE');
        done();
      });
    });

  });

});<commit_msg>Fixed cz_praha8_hazardous_waste scraper unit test<commit_after>var
  expect  = require('chai').expect,
  fs      = require('fs'),
  scraper = require('../../bin/scrapers/cz_praha8_hazardous_waste.js');

describe('cz_praha8_hazardous_waste', function() {

  describe('parse()', function() {
    var body;
    // parse date is sensitive to current date since it is
    // guessing year from current date and input parameters
    before(function(done) {
      fs.readFile('test/data/nebezpecny_odpad_2016-04-10.html', 'utf8', function (err, data) {
        if (err) {
          console.error(err);
          return done(err);
        }
        body = data;
        done();
      });
    });

    it('should expose a function', function () {
      expect(scraper.parse).to.be.a('function');
    });

    it('should parse all rows', function(done) {
      scraper.parse(body, function(err, res){
        if (err) return done(err);
        expect(res).to.have.length(181);
        done();
      });
    });

    it('should parse row correctly', function(done) {
      scraper.parse(body, function(err, res){
        if (err) return done(err);
        var date = parserUtil.dateWithoutYear('27.04.');
        expect(res[0].place_name).to.equal('křižovatka ul. Prosecká – Pod Labuťkou');
        expect(res[0].time_from).to.eql(new Date(date[0], date[1], date[2], 15, 0));
        expect(res[0].time_to).to.eql(new Date(date[0], date[1], date[2], 15, 20));
        expect(res[0].container_type || scraper.containerType).to.equal('HAZARDOUS_WASTE');
        done();
      });
    });

  });

});
{'fraction_non_alphanumeric': 0.16879711569977057, 'fraction_numerical': 0.024582104228121928, 'mean_word_length': 2.7219512195121953, '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': '6334172', 'n_tokens_mistral': 1085, 'n_tokens_neox': 1030, 'n_words': 203}