mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-21 01:53:26 +00:00
Add test for blocks markdown/asciidoc/markup
This commit is contained in:
+16
-1
@@ -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');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user