From a2fbaa4ccded9dd4446de022c20cf48908a20924 Mon Sep 17 00:00:00 2001 From: Yuki Hattori Date: Wed, 20 Mar 2019 00:38:25 +0900 Subject: [PATCH 1/3] Update test case of front-matter detection --- src/extension.test.ts | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/extension.test.ts b/src/extension.test.ts index b703104b..91bf04b0 100644 --- a/src/extension.test.ts +++ b/src/extension.test.ts @@ -39,19 +39,24 @@ describe('#extendMarkdownIt', () => { const marpMd = (md: string) => `---\nmarp: true\n---\n\n${md}` describe('Marp Core', () => { - const markdown = '# Hello :wave:\n\n' + const baseMd = '# Hello :wave:\n\n' - it('uses default engine without marp front-matter', () => { - const html = extendMarkdownIt(new markdownIt()).render(markdown) + it('uses default engine when not enabled marp front-matter', () => { + const confusingMd = + '---\nmarp: false\n---\n\n```markdown\n---\nmarp: true\n---\n```' - expect(html).not.toContain('
') - expect(html).not.toContain('