From 1a33e6e631fbc649d271ec3c525dd084b79c16a1 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Fri, 3 May 2024 12:48:19 -0400 Subject: [PATCH] Passing almost all tests --- tests/markdown/mustache-syntax.test.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/markdown/mustache-syntax.test.js b/tests/markdown/mustache-syntax.test.js index d1d64a9de..f42cbbac8 100644 --- a/tests/markdown/mustache-syntax.test.js +++ b/tests/markdown/mustache-syntax.test.js @@ -255,10 +255,10 @@ describe('Injection: When an injection tag follows an element', ()=>{ expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('text'); }); - it.failing('Renders a span "text" with injected attribute', function() { + it('Renders a span "text" with injected attribute', function() { const source = '{{ text}}{a="b and c"}'; const rendered = Markdown.render(source); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('text'); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('text'); }); it('Renders a span "text" with injected style', function() { @@ -291,16 +291,16 @@ describe('Injection: When an injection tag follows an element', ()=>{ expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('

code

'); }); - it.failing('Renders an image element with injected style', function() { + it('Renders an image element with injected style', function() { const source = '![alt text](http://i.imgur.com/hMna6G0.png){position:absolute}'; const rendered = Markdown.render(source).trimReturns(); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('

homebrew mug

'); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('

alt text

'); }); it.failing('Renders an element modified by only the first of two consecutive injections', function() { const source = '{{ text}}{color:red}{background:blue}'; const rendered = Markdown.render(source).trimReturns(); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('

text{background:blue}

'); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('text{background:blue}'); }); it('Renders an image with added attributes', function() { @@ -329,29 +329,29 @@ describe('Injection: When an injection tag follows an element', ()=>{ expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('

text

'); }); - it.failing('renders a div "text" with two injected styles', function() { + it('renders a div "text" with two injected styles', function() { const source = dedent`{{ text }} {color:red,background:blue}`; const rendered = Markdown.render(source).trimReturns(); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`

text

`); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`

text

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

text

`); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`

text

`); }); - it.failing('renders an h2 header "text" with injected class name', function() { + it('renders an h2 header "text" with injected class name', function() { const source = dedent`## text {ClassName}`; const rendered = Markdown.render(source).trimReturns(); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('

text

'); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('

text

'); }); it('renders a table with injected class name', function() { @@ -376,12 +376,12 @@ describe('Injection: When an injection tag follows an element', ()=>{ // expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`...`); // FIXME: expect this to be injected into