<commit_before><commit_msg>Add failing line block tests<commit_after>/// <reference path="../../../typings/mocha/mocha.d.ts" />
/// <reference path="../../../typings/chai/chai.d.ts" />

import { expect } from 'chai'
import * as Up from '../../index'
import { SyntaxNode } from '../../SyntaxNodes/SyntaxNode'
import { LinkNode } from '../../SyntaxNodes/LinkNode'
import { DocumentNode } from '../../SyntaxNodes/DocumentNode'
import { PlainTextNode } from '../../SyntaxNodes/PlainTextNode'
import { EmphasisNode } from '../../SyntaxNodes/EmphasisNode'
import { StressNode } from '../../SyntaxNodes/StressNode'
import { InlineCodeNode } from '../../SyntaxNodes/InlineCodeNode'
import { RevisionInsertionNode } from '../../SyntaxNodes/RevisionInsertionNode'
import { RevisionDeletionNode } from '../../SyntaxNodes/RevisionDeletionNode'
import { SpoilerNode } from '../../SyntaxNodes/SpoilerNode'
import { InlineAsideNode } from '../../SyntaxNodes/InlineAsideNode'
import { ParagraphNode } from '../../SyntaxNodes/ParagraphNode'
import { SectionSeparatorNode } from '../../SyntaxNodes/SectionSeparatorNode'
import { HeadingNode } from '../../SyntaxNodes/HeadingNode'
import { LineBlockNode } from '../../SyntaxNodes/LineBlockNode'
import { LineNode } from '../../SyntaxNodes/LineNode'


function insideDocument(syntaxNodes: SyntaxNode[]): DocumentNode {
  return new DocumentNode(syntaxNodes);
}


describe('Consecutive non-blank lines', function() {
  it('produce a line block node containing line nodes', function() {
    const text =
      `
Roses are red
Violets are blue`
    expect(Up.ast(text)).to.be.eql(
      insideDocument([
        new LineBlockNode([
          new LineNode([
            new PlainTextNode('Roses are red')
          ]),
          new LineNode([
            new PlainTextNode('Violets are blue')
          ]),
        ]),
      ]))
  })

  it('can contain inline conventions', function() {
    const text =
      `
Roses are red
Violets are **blue**`
    expect(Up.ast(text)).to.be.eql(
      insideDocument([
        new LineBlockNode([
          new LineNode([
            new PlainTextNode('Roses are red')
          ]),
          new LineNode([
            new PlainTextNode('Violets are '),
            new StressNode([
              new PlainTextNode('blue')
            ])
          ]),
        ]),
      ]))
  })
})
{'fraction_non_alphanumeric': 0.15807413719642097, 'fraction_numerical': 0.0, 'mean_word_length': 2.6403100775193797, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '484881', 'n_tokens_mistral': 670, 'n_tokens_neox': 656, 'n_words': 158}