summaryrefslogtreecommitdiffstats
path: root/test/parsing.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-01-19 15:26:31 +0100
committerSamy Pessé <samypesse@gmail.com>2015-01-19 15:26:31 +0100
commit793600ab2fe3923062b06dd25e59655805882409 (patch)
treec385fbadece8b41b69dbd995a94744a1370f01e2 /test/parsing.js
parent354b4afba1ddd1f86fb587da0c74388df89dbc28 (diff)
downloadgitbook-793600ab2fe3923062b06dd25e59655805882409.zip
gitbook-793600ab2fe3923062b06dd25e59655805882409.tar.gz
gitbook-793600ab2fe3923062b06dd25e59655805882409.tar.bz2
Improve test to test a all book
Diffstat (limited to 'test/parsing.js')
-rw-r--r--test/parsing.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/parsing.js b/test/parsing.js
new file mode 100644
index 0000000..3d41939
--- /dev/null
+++ b/test/parsing.js
@@ -0,0 +1,14 @@
+var path = require('path');
+var assert = require('assert');
+
+var Book = require('../').Book;
+
+describe('Book parsing', function () {
+ it('should correctly parse it from markdown', function() {
+ var LEXED = book1.summary;
+
+ assert.equal(LEXED.chapters[0].path,'intro.md');
+ assert.equal(LEXED.chapters[1].path,'test.md');
+ assert.equal(LEXED.chapters[2].path,'test2.md');
+ });
+});