summaryrefslogtreecommitdiffstats
path: root/test/page.js
diff options
context:
space:
mode:
authorSamy Pesse <samypesse@gmail.com>2016-02-11 22:12:07 +0100
committerSamy Pesse <samypesse@gmail.com>2016-02-11 22:12:07 +0100
commit756694c029218510592418deb8aaf6f3b36f95c3 (patch)
tree86d938cbf6360d46845758a7cc9575ca04aa3594 /test/page.js
parent669f3b39849890c48171d807225cd6eaa3c9086b (diff)
downloadgitbook-756694c029218510592418deb8aaf6f3b36f95c3.zip
gitbook-756694c029218510592418deb8aaf6f3b36f95c3.tar.gz
gitbook-756694c029218510592418deb8aaf6f3b36f95c3.tar.bz2
Page output a simple html string
Diffstat (limited to 'test/page.js')
-rw-r--r--test/page.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/page.js b/test/page.js
new file mode 100644
index 0000000..66c06e1
--- /dev/null
+++ b/test/page.js
@@ -0,0 +1,26 @@
+var mock = require('./mock');
+
+describe('Page', function() {
+ var book;
+
+ before(function() {
+ return mock.setupDefaultBook({
+ 'heading.md': '# Hello\n\n## World'
+ })
+ .then(function(_book) {
+ book = _book;
+ return book.summary.load();
+ });
+ });
+
+ it.only('should add a default ID to headings', function() {
+ var page = book.addPage('heading.md');
+
+ return page.parse()
+ .then(function() {
+ console.log(page.content);
+ });
+
+ });
+
+}); \ No newline at end of file