diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-01-19 15:31:58 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-01-19 15:31:58 +0100 |
commit | d172aaefee8eb733d23a4e92abd79cbc4a43f801 (patch) | |
tree | 21bbc73c3df4c0a284e0140e12fdeb03ba831a3f /test/parsing.js | |
parent | f0ea7bc53b6a586a2edaf25e31aa0f2cad661434 (diff) | |
download | gitbook-d172aaefee8eb733d23a4e92abd79cbc4a43f801.zip gitbook-d172aaefee8eb733d23a4e92abd79cbc4a43f801.tar.gz gitbook-d172aaefee8eb733d23a4e92abd79cbc4a43f801.tar.bz2 |
Add test for glossary parsing
Diffstat (limited to 'test/parsing.js')
-rw-r--r-- | test/parsing.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/parsing.js b/test/parsing.js index 4aec3be..1464ed2 100644 --- a/test/parsing.js +++ b/test/parsing.js @@ -16,4 +16,16 @@ describe('Book parsing', function () { assert.equal(LEXED.chapters[1].path, 'test.md'); assert.equal(LEXED.chapters[2].path, 'test2.md'); }); + + it('should correctly parse the glossary', function() { + var LEXED = book1.glossary; + + assert.equal(LEXED[0].id, "test"); + assert.equal(LEXED[0].name, "Test"); + assert.equal(LEXED[0].description, "a test text"); + + assert.equal(LEXED[1].id, "test 2"); + assert.equal(LEXED[1].name, "Test 2"); + assert.equal(LEXED[1].description, "a second test"); + }); }); |