summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2016-04-14 10:07:51 +0200
committerSamy Pessé <samypesse@gmail.com>2016-04-14 10:07:51 +0200
commitdf46217c78ddb3735005c5514b84269d5614b63e (patch)
tree300a6514c0c4ff9f382ef285bf8af5d18273db9d /test
parentd18cc9239614d145b7224260ba5787c149ed46d3 (diff)
downloadgitbook-df46217c78ddb3735005c5514b84269d5614b63e.zip
gitbook-df46217c78ddb3735005c5514b84269d5614b63e.tar.gz
gitbook-df46217c78ddb3735005c5514b84269d5614b63e.tar.bz2
Improve description extraction and adapt unit tests
Diffstat (limited to 'test')
-rw-r--r--test/page.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/page.js b/test/page.js
index 0fc59e7..ed2b777 100644
--- a/test/page.js
+++ b/test/page.js
@@ -8,7 +8,7 @@ describe('Page', function() {
return mock.setupDefaultBook({
'README.md': ' # Hello World\n\nThis is a description',
'heading.md': '# Hello\n\n## World',
- 'description.md': '# This is a title\n\nThis is the short description.\n\nNot this one.',
+ 'description.md': '# This is a title\n\nThis is the short description.\n\nAnd the rest of the description.\n\n# Heading\n\nThis is not in the description',
'frontmatter/description.md': '---\ndescription: Hello World\n---\n\n# This is a title\n\nThis is not the description',
'frontmatter/var.md': '---\ntest: Hello World\n---\n\n{{ page.test }}',
@@ -141,7 +141,7 @@ describe('Page', function() {
return page.toHTML(output)
.then(function() {
- page.attributes.description.should.equal('This is the short description.');
+ page.attributes.description.should.equal('This is the short description. And the rest of the description.');
});
});
});