<commit_before>'use strict';

require('should');
var anyfetchFileHydrater = require('anyfetch-file-hydrater');
var markdown = require('../lib/');

describe('Test markdown results', function() {
  it('returns the correct informations', function(done) {
    var document = {
      data: {},
    };

    var changes = anyfetchFileHydrater.defaultChanges();

    markdown(__dirname + "/samples/document.md", document, changes, function(err, changes) {
      if (err) {
        done(new Error("It should not have an error"));
      }

      changes.should.have.property('data');
      changes.should.have.property('document_type', 'document');
      changes.data.should.have.property('html');

      changes.data.html.should.containDeep('<h1>Test document</h1>');
      changes.data.html.should.containDeep('<blockquote><p>Citation</p></blockquote>');
      changes.data.html.should.containDeep('<p>Normal text</p>');

      done();
    });
  });

  it('should return an error', function(done) {
    var document = {
      data: {},
    };

    var changes = anyfetchFileHydrater.defaultChanges();

    markdown(__dirname + "/samples/notfound.md", document, changes, function(err) {
      if (err) {
        done();
      } else {
        done(new Error("It should have an error"));
      }
    });
  });
});<commit_msg>Fix two syntax errors in test/test.js<commit_after>'use strict';

require('should');
var anyfetchFileHydrater = require('anyfetch-file-hydrater');
var markdown = require('../lib/');

describe('Test markdown results', function() {
  it('returns the correct informations', function(done) {
    var document = {
      data: {},
    };

    var changes = anyfetchFileHydrater.defaultChanges();

    markdown(__dirname + "/samples/document.md", document, changes, function(err, changes) {
      if(err) {
        done(new Error("It should not have an error"));
      }

      changes.should.have.property('data');
      changes.should.have.property('document_type', 'document');
      changes.data.should.have.property('html');

      changes.data.html.should.containDeep('<h1>Test document</h1>');
      changes.data.html.should.containDeep('<blockquote><p>Citation</p></blockquote>');
      changes.data.html.should.containDeep('<p>Normal text</p>');

      done();
    });
  });

  it('should return an error', function(done) {
    var document = {
      data: {},
    };

    var changes = anyfetchFileHydrater.defaultChanges();

    markdown(__dirname + "/samples/notfound.md", document, changes, function(err) {
      if(err) {
        done();
      } else {
        done(new Error("It should have an error"));
      }
    });
  });
});
{'fraction_non_alphanumeric': 0.1689291101055807, 'fraction_numerical': 0.0015082956259426848, 'mean_word_length': 3.2380191693290734, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, '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': '4957958', 'n_tokens_mistral': 802, 'n_tokens_neox': 775, 'n_words': 153}