<commit_before>const renderer = require('../renderer')

describe ('Renderer', () => {
  var loadContentCallback

  beforeEach(() => {
    loadContentCallback = jasmine.createSpy('loadContentCallback')
  })

  it('converts a markdown file', (done) => {
    const markdownFilePath = __dirname + '/test_readme.md'
    const expectedMarkdown = '^[^<>]*<div class="markdown-body"><h1 id="hello">Hello</h1></div>$'

    renderer.reloadMarkdownFile(markdownFilePath, loadContentCallback).then(() => {
      expect(loadContentCallback.calls.count()).toEqual(1)
      expect(loadContentCallback.calls.mostRecent().args[0]).toMatch(expectedMarkdown)
      done()
    })
  })
})<commit_msg>Add done.fail to spec<commit_after>const renderer = require('../renderer')

describe ('Renderer', () => {
  var loadContentCallback

  beforeEach(() => {
    loadContentCallback = jasmine.createSpy('loadContentCallback')
  })

  it('converts a markdown file', (done) => {
    const markdownFilePath = __dirname + '/test_readme.md'
    const expectedMarkdown = '^[^<>]*<div class="markdown-body"><h1 id="hello">Hello</h1></div>$'

    renderer.reloadMarkdownFile(markdownFilePath, loadContentCallback).then(() => {
      expect(loadContentCallback.calls.count()).toEqual(1)
      expect(loadContentCallback.calls.mostRecent().args[0]).toMatch(expectedMarkdown)
      done()
    }, done.fail)
  })
})
{'fraction_non_alphanumeric': 0.1721132897603486, 'fraction_numerical': 0.005809731299927378, 'mean_word_length': 4.7656903765690375, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 21, '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': '5768320', 'n_tokens_mistral': 430, 'n_tokens_neox': 417, 'n_words': 62}