/* eslint-disable max-lines */ const Markdown = require('naturalcrit/markdown.js'); describe('Dictionary Terms', ()=>{ test('Single Definition', function() { const source = 'My term :: My First Definition\n\n'; const rendered = Markdown.render(source); expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
My term
My First Definition
'); }); test('Two Definitions', function() { const source = 'My term :: My First Definition :: My Second Definition\n\n'; const rendered = Markdown.render(source); expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
My term
My First Definition
\n
My Second Definition
'); }); test('Three Definitions', function() { const source = 'My term :: My First Definition :: My Second Definition :: My Third Definition\n\n'; const rendered = Markdown.render(source); expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
My term
My First Definition
\n
My Second Definition
\n
My Third Definition
'); }); test('Multiline Definitions', function() { const source = '**Example** :: V3 uses HTML *definition lists* to create "lists" with hanging indents.\n::Three\n::Four\n\nHello::I\'m a different\n::List\n\n'; const rendered = Markdown.render(source); expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Example
V3 uses HTML definition lists to create “lists” with hanging indents.
\n
Three
\n
Four
Hello
I\’m a different
\n
List
'); }); });