diff --git a/tests/markdown/mustache-syntax.test.js b/tests/markdown/mustache-syntax.test.js index 8ca12519e..b32876353 100644 --- a/tests/markdown/mustache-syntax.test.js +++ b/tests/markdown/mustache-syntax.test.js @@ -130,8 +130,8 @@ describe('Inline: When using the Inline syntax {{ }}', ()=>{ describe(`Block: When using the Block syntax {{tags\\ntext\\n}}`, ()=>{ it('Renders a div with text only', function() { const source = dedent`{{ - text - }}`; + text + }}`; const rendered = Markdown.render(source).trimReturns(); expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`

text

`); }); @@ -139,14 +139,14 @@ describe(`Block: When using the Block syntax {{tags\\ntext\\n}}`, ()=>{ it('Renders an empty div', function() { const source = dedent`{{ - }}`; + }}`; const rendered = Markdown.render(source).trimReturns(); expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`
`); }); it('Renders a single paragraph with opening and closing brackets', function() { const source = dedent`{{ - }}`; + }}`; const rendered = Markdown.render(source).trimReturns(); expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`

{{}}

`); }); @@ -154,79 +154,79 @@ describe(`Block: When using the Block syntax {{tags\\ntext\\n}}`, ()=>{ it('Renders a div with a single class', function() { const source = dedent`{{cat - }}`; + }}`; const rendered = Markdown.render(source).trimReturns(); expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`
`); }); it('Renders a div with a single class and text', function() { const source = dedent`{{cat - Sample text. - }}`; + Sample text. + }}`; const rendered = Markdown.render(source).trimReturns(); expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`

Sample text.

`); }); it('Renders a div with two classes and text', function() { const source = dedent`{{cat,dog - Sample text. - }}`; + Sample text. + }}`; const rendered = Markdown.render(source).trimReturns(); expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`

Sample text.

`); }); it('Renders a div with a style and text', function() { const source = dedent`{{color:red - Sample text. - }}`; + Sample text. + }}`; const rendered = Markdown.render(source).trimReturns(); expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`

Sample text.

`); }); it('Renders a div with a style that has a string variable, and text', function() { const source = dedent`{{--stringVariable:"'string'" - Sample text. - }}`; + Sample text. + }}`; const rendered = Markdown.render(source).trimReturns(); expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`

Sample text.

`); }); it('Renders a div with a style that has a string variable, and text', function() { const source = dedent`{{--stringVariable:"'string'" - Sample text. - }}`; + Sample text. + }}`; const rendered = Markdown.render(source).trimReturns(); expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`

Sample text.

`); }); it('Renders a div with a class, style and text', function() { const source = dedent`{{cat,color:red - Sample text. - }}`; + Sample text. + }}`; const rendered = Markdown.render(source).trimReturns(); expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`

Sample text.

`); }); it('Renders a div with an ID, class, style and text (different order)', function() { const source = dedent`{{color:red,cat,#dog - Sample text. - }}`; + Sample text. + }}`; const rendered = Markdown.render(source).trimReturns(); expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`

Sample text.

`); }); it('Renders a div with a single ID', function() { const source = dedent`{{#cat,#dog - Sample text. - }}`; + Sample text. + }}`; const rendered = Markdown.render(source).trimReturns(); expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`

Sample text.

`); }); it('Renders a div with an ID, class, style and text, and a variable assignment', function() { const source = dedent`{{color:red,cat,#dog,a="b and c",d="e" - Sample text. - }}`; + Sample text. + }}`; const rendered = Markdown.render(source).trimReturns(); expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`

Sample text.

`); }); @@ -361,9 +361,9 @@ describe('Injection: When an injection tag follows an element', ()=>{ it('renders a div "text" with two injected styles', function() { const source = dedent`{{ - text - }} - {color:red,background:blue}`; + text + }} + {color:red,background:blue}`; const rendered = Markdown.render(source).trimReturns(); expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`

text

`); }); @@ -424,18 +424,18 @@ describe('Injection: When an injection tag follows an element', ()=>{ it('renders an h2 header "text" with injected class name', function() { const source = dedent`## text - {ClassName}`; + {ClassName}`; const rendered = Markdown.render(source).trimReturns(); expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('

text

'); }); it('renders a table with injected class name', function() { const source = dedent`| Experience Points | Level | - |:------------------|:-----:| - | 0 | 1 | - | 300 | 2 | + |:------------------|:-----:| + | 0 | 1 | + | 300 | 2 | - {ClassName}`; + {ClassName}`; const rendered = Markdown.render(source).trimReturns(); expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`
Experience PointsLevel
01
3002
`); }); @@ -461,13 +461,13 @@ describe('Injection: When an injection tag follows an element', ()=>{ it('renders a div nested into another div, the inner with class=innerDiv and the other class=outerDiv', function() { const source = dedent`{{ - outer text - {{ - inner text - }} - {innerDiv} - }} - {outerDiv}`; + outer text + {{ + inner text + }} + {innerDiv} + }} + {outerDiv}`; const rendered = Markdown.render(source).trimReturns(); expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('

outer text

inner text

'); });