diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-01-19 15:28:13 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-01-19 15:28:13 +0100 |
commit | f0ea7bc53b6a586a2edaf25e31aa0f2cad661434 (patch) | |
tree | cdaa127fbeadf2fe7b41ad1c6def93c04d0265cf /test/parsing.js | |
parent | 793600ab2fe3923062b06dd25e59655805882409 (diff) | |
download | gitbook-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.js | 13 |
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'); }); }); |