From 55deab03cd5ed0fee18cb768a24625e079ea1b41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Fri, 18 Mar 2016 11:26:31 +0100 Subject: [PATCH] Add test for blocks markdown/asciidoc/markup --- test/page.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/test/page.js b/test/page.js index 08239bce5..f961653a5 100644 --- a/test/page.js +++ b/test/page.js @@ -38,7 +38,10 @@ describe('Page', function() { 'variables/config/title.md': '{{ config.title}}', 'variables/gitbook/generator.md': '{{ gitbook.generator }}', - 'GLOSSARY.md': '# Glossary\n\n\n## abracadabra\n\nthis is the description' + 'GLOSSARY.md': '# Glossary\n\n\n## abracadabra\n\nthis is the description', + + 'blocks/markdown.md': 'Hello {% markdown %}**World**{% endmarkdown %}', + 'blocks/asciidoc.md': 'Hello {% asciidoc %}^super^script phrase{% endasciidoc %}' }, [ { title: 'Test page.next', @@ -413,4 +416,16 @@ describe('Page', function() { }); }); }); + + describe('Default Blocks', function() { + it('should render block "markdown"', function() { + return book.addPage('blocks/markdown.md').toHTML(output) + .should.finally.equal('

Hello World

\n'); + }); + + it('should render block "asciidoc"', function() { + return book.addPage('blocks/asciidoc.md').toHTML(output) + .should.finally.equal('

Hello superscript phrase

\n'); + }); + }); });