summaryrefslogtreecommitdiffstats
path: root/test/parsing.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-01-19 15:28:13 +0100
committerSamy Pessé <samypesse@gmail.com>2015-01-19 15:28:13 +0100
commitf0ea7bc53b6a586a2edaf25e31aa0f2cad661434 (patch)
treecdaa127fbeadf2fe7b41ad1c6def93c04d0265cf /test/parsing.js
parent793600ab2fe3923062b06dd25e59655805882409 (diff)
downloadgitbook-f0ea7bc53b6a586a2edaf25e31aa0f2cad661434.zip
gitbook-f0ea7bc53b6a586a2edaf25e31aa0f2cad661434.tar.gz
gitbook-f0ea7bc53b6a586a2edaf25e31aa0f2cad661434.tar.bz2
Add test for readme parsing
Diffstat (limited to 'test/parsing.js')
-rw-r--r--test/parsing.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/test/parsing.js b/test/parsing.js
index 3d41939..4aec3be 100644
--- a/test/parsing.js
+++ b/test/parsing.js
@@ -4,11 +4,16 @@ var assert = require('assert');
var Book = require('../').Book;
describe('Book parsing', function () {
- it('should correctly parse it from markdown', function() {
+ it('should correctly parse the readme', function() {
+ assert.equal(book1.options.title, 'My Book');
+ assert.equal(book1.options.description, 'Test description');
+ });
+
+ it('should correctly parse the summary', 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');
+ assert.equal(LEXED.chapters[0].path, 'intro.md');
+ assert.equal(LEXED.chapters[1].path, 'test.md');
+ assert.equal(LEXED.chapters[2].path, 'test2.md');
});
});