summaryrefslogtreecommitdiffstats
path: root/test/page.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2016-03-18 11:26:31 +0100
committerSamy Pessé <samypesse@gmail.com>2016-03-18 11:26:31 +0100
commit55deab03cd5ed0fee18cb768a24625e079ea1b41 (patch)
treea8a9cf22b3def6c8aa0ae5a886d8dcb7e015ed56 /test/page.js
parentedda84fefd17426fcdf822fc3fb746f30047085c (diff)
downloadgitbook-55deab03cd5ed0fee18cb768a24625e079ea1b41.zip
gitbook-55deab03cd5ed0fee18cb768a24625e079ea1b41.tar.gz
gitbook-55deab03cd5ed0fee18cb768a24625e079ea1b41.tar.bz2
Add test for blocks markdown/asciidoc/markup
Diffstat (limited to 'test/page.js')
-rw-r--r--test/page.js17
1 files changed, 16 insertions, 1 deletions
diff --git a/test/page.js b/test/page.js
index 08239bc..f961653 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 <span>{% markdown %}**World**{% endmarkdown %}</span>',
+ 'blocks/asciidoc.md': 'Hello <span>{% asciidoc %}^super^script phrase{% endasciidoc %}</span>'
}, [
{
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('<p>Hello <span><strong>World</strong></span></p>\n');
+ });
+
+ it('should render block "asciidoc"', function() {
+ return book.addPage('blocks/asciidoc.md').toHTML(output)
+ .should.finally.equal('<p>Hello <span><sup>super</sup>script phrase</span></p>\n');
+ });
+ });
});