diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-01-21 22:51:59 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-01-21 22:51:59 +0100 |
commit | 85930161f7a32c6c5c7de82a47554ed2855c14df (patch) | |
tree | 5c784ec80b59dd71867527d1658b1b5186b73a1e /test/parsing.js | |
parent | 4f9ece1ec114901d817c77e584b933f195ece923 (diff) | |
download | gitbook-85930161f7a32c6c5c7de82a47554ed2855c14df.zip gitbook-85930161f7a32c6c5c7de82a47554ed2855c14df.tar.gz gitbook-85930161f7a32c6c5c7de82a47554ed2855c14df.tar.bz2 |
Normalize tests
Diffstat (limited to 'test/parsing.js')
-rw-r--r-- | test/parsing.js | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/test/parsing.js b/test/parsing.js index 7be50cd..f61a4fe 100644 --- a/test/parsing.js +++ b/test/parsing.js @@ -4,17 +4,17 @@ var assert = require('assert'); describe('Book parsing', function () { it('should correctly parse the readme', function() { - assert.equal(book1.options.title, 'My Book'); - assert.equal(book1.options.description, 'Test description'); + assert.equal(books[1].options.title, 'My Book'); + assert.equal(books[1].options.description, 'Test description'); }); it('should correctly parse the readme with asciidoc', function() { - assert.equal(book3.options.title, 'My Book'); - assert.equal(book3.options.description, 'Test description'); + assert.equal(books[3].options.title, 'My Book'); + assert.equal(books[3].options.description, 'Test description'); }); it('should correctly parse the summary', function() { - var LEXED = book1.summary; + var LEXED = books[1].summary; assert.equal(LEXED.chapters[0].path, 'intro.md'); assert.equal(LEXED.chapters[1].path, 'test.md'); @@ -22,7 +22,7 @@ describe('Book parsing', function () { }); it('should correctly parse the glossary', function() { - var LEXED = book1.glossary; + var LEXED = books[1].glossary; assert.equal(LEXED[0].id, "test"); assert.equal(LEXED[0].name, "Test"); @@ -34,24 +34,24 @@ describe('Book parsing', function () { }); it('should correctly parse list of files', function() { - var FILES = book1.files; + var FILES = books[1].files; assert.deepEqual(FILES, [ 'README.md', 'intro.md', 'sub/', 'sub/test1.md' ]); }); it('should correctly parse the languages', function() { - assert.equal(book2.books.length, 2); - assert(book2.isMultilingual()); + assert.equal(books[2].books.length, 2); + assert(books[2].isMultilingual()); - assert.equal(book2.books[0].options.lang, "en"); - assert.equal(book2.books[0].options.title, "English Book"); + assert.equal(books[2].books[0].options.lang, "en"); + assert.equal(books[2].books[0].options.title, "English Book"); - assert.equal(book2.books[1].options.lang, "fr"); - assert.equal(book2.books[1].options.title, "French Book"); + assert.equal(books[2].books[1].options.lang, "fr"); + assert.equal(books[2].books[1].options.title, "French Book"); }); it('should correctly parse the navigation', function() { - var NAVIGATION = book1.navigation; + var NAVIGATION = books[1].navigation; assert.equal(_.size(NAVIGATION), 2); assert(NAVIGATION["intro.md"]) |