<commit_before>"use strict";



var should = require('should');
var testutil = require('./testutil.js');

var path = require('path');
var fs = require('fs');
var async = require('async');
var nock =require('nock');

var articleModule = require('../model/article.js');
var blogModule = require('../model/blog.js');
var BlogRenderer = require('../render/BlogRenderer.js');







describe('render/blogrenderer', function() {
  var renderer =  new BlogRenderer.HtmlRenderer();
  before(function (bddone) {
    nock('https://hooks.slack.com/')
      .post(/\/services\/.*/)
      .times(999)
      .reply(200,"ok");

    process.env.TZ = 'Europe/Amsterdam';
    testutil.clearDB(bddone);
  });
  after(function (bddone){
    nock.cleanAll();
    bddone();
  });


  describe('htmlArticle',function() {
    it('should generate a preview when no markdown is specified (no Edit Link)',function (bddone) {
      var article = articleModule.create({title:"Test Title"});
      var result = renderer.renderArticle("DE",article);
      should(result).equal('<li id="undefined_test_title">\nTest Title\n</li>');
      bddone();
    });
    it('should generate a preview when no markdown2 is specified (no Edit Link)',function (bddone) {
      var article = articleModule.create({collection:"Test Collection"});
      var result = renderer.renderArticle("DE",article);
      should(result).equal('<li id="undefined_0">\nTest Collection\n</li>');
      bddone();
    });
    it('should generate a preview when no markdown2 is specified (Edit Link)',function (bddone) {
      var article = articleModule.create({collection:"Test Collection"});
      var result = renderer.renderArticle("DE",article);
      should(result).equal('<li id="undefined_0">\nTest Collection\n</li>');
      bddone();
    });
    it('should generate a preview when markdown is specified (Edit Link)',function (bddone) {
      var article = articleModule.create({markdownDE:"[Paul](https://test.link.de) tells something about [nothing](www.nothing.de)."});<commit_msg>Fix Test.<commit_after>"use strict";



var should = require('should');
var testutil = require('./testutil.js');

var path = require('path');
var fs = require('fs');
var async = require('async');
var nock =require('nock');

var articleModule = require('../model/article.js');
var blogModule = require('../model/blog.js');
var BlogRenderer = require('../render/BlogRenderer.js');







describe('render/blogrenderer', function() {
  var renderer =  new BlogRenderer.HtmlRenderer();
  before(function (bddone) {
    nock('https://hooks.slack.com/')
      .post(/\/services\/.*/)
      .times(999)
      .reply(200,"ok");

    process.env.TZ = 'Europe/Amsterdam';
    testutil.clearDB(bddone);
  });
  after(function (bddone){
    nock.cleanAll();
    bddone();
  });


  describe('htmlArticle',function() {
    it('should generate a preview when no markdown is specified (no Edit Link)',function (bddone) {
      var article = articleModule.create({title:"Test Title"});
      var result = renderer.renderArticle("DE",article);
      should(result).equal('<li id="undefined_0">\nTest Title\n</li>');
      bddone();
    });
    it('should generate a preview when no markdown2 is specified (no Edit Link)',function (bddone) {
      var article = articleModule.create({collection:"Test Collection"});
      var result = renderer.renderArticle("DE",article);
      should(result).equal('<li id="undefined_0">\nTest Collection\n</li>');
      bddone();
    });
    it('should generate a preview when no markdown2 is specified (Edit Link)',function (bddone) {
      var article = articleModule.create({collection:"Test Collection"});
      var result = renderer.renderArticle("DE",article);
      should(result).equal('<li id="undefined_0">\nTest Collection\n</li>');
      bddone();
    });
    it('should generate a preview when markdown is specified (Edit Link)',function (bddone) {
      var article = articleModule.create({markdownDE:"[Paul](https://test.link.de) tells something about [nothing](www.nothing.de)."});
{'fraction_non_alphanumeric': 0.17289141726440763, 'fraction_numerical': 0.0051941627504328465, 'mean_word_length': 3.9864364981504314, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, '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': '4019097', 'n_tokens_mistral': 1240, 'n_tokens_neox': 1183, 'n_words': 276}