<commit_before>MarkdownPreviewView = require '../lib/markdown-preview-view'
{$, $$$} = require 'atom'

describe "MarkdownPreviewView", ->
  [buffer, preview] = []

  beforeEach ->
    atom.project.setPath(project.resolve('markdown'))
    buffer = atom.project.bufferForPathSync('file.markdown')
    atom.packages.activatePackage('language-ruby', sync: true)
    preview = new MarkdownPreviewView(buffer.getPath())

    waitsFor ->
      preview.buffer

  afterEach ->
    buffer.release()

  describe "on construction", ->
    it "shows a loading spinner and renders the markdown", ->
      preview.setLoading()
      expect(preview.find('.markdown-spinner')).toExist()
      expect(preview.buffer.getText()).toBe buffer.getText()

      preview.renderMarkdown()
      expect(preview.find(".emoji")).toExist()
<commit_msg>Add atom prefix to project<commit_after>MarkdownPreviewView = require '../lib/markdown-preview-view'
{$, $$$} = require 'atom'

describe "MarkdownPreviewView", ->
  [buffer, preview] = []

  beforeEach ->
    atom.project.setPath(atom.project.resolve('markdown'))
    buffer = atom.project.bufferForPathSync('file.markdown')
    atom.packages.activatePackage('language-ruby', sync: true)
    preview = new MarkdownPreviewView(buffer.getPath())

    waitsFor ->
      preview.buffer

  afterEach ->
    buffer.release()

  describe "on construction", ->
    it "shows a loading spinner and renders the markdown", ->
      preview.setLoading()
      expect(preview.find('.markdown-spinner')).toExist()
      expect(preview.buffer.getText()).toBe buffer.getText()

      preview.renderMarkdown()
      expect(preview.find(".emoji")).toExist()

{'fraction_non_alphanumeric': 0.14981949458483754, 'fraction_numerical': 0.0, 'mean_word_length': 3.80635838150289, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '4137644', 'n_tokens_mistral': 495, 'n_tokens_neox': 474, 'n_words': 86}