diff options
Diffstat (limited to 'packages/gitbook-html/test/summary.js')
-rwxr-xr-x | packages/gitbook-html/test/summary.js | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/packages/gitbook-html/test/summary.js b/packages/gitbook-html/test/summary.js index 4d06c32..02104cd 100755 --- a/packages/gitbook-html/test/summary.js +++ b/packages/gitbook-html/test/summary.js @@ -13,14 +13,26 @@ describe('Summary parsing', function () { PART = LEXED.parts[0]; }); - it('should detect parts', function() { - assert.equal(LEXED.parts.length, 3); + describe('Parts', function() { + it('should detect parts', function() { + assert.equal(LEXED.parts.length, 3); + }); + + it('should detect title', function() { + assert.equal(LEXED.parts[0].title, ''); + assert.equal(LEXED.parts[1].title, 'Part 2'); + assert.equal(LEXED.parts[2].title, ''); + }); }); it('should detect chapters', function() { assert.equal(PART.articles.length, 5); }); + it('should detect chapters in other parts', function() { + assert.equal(LEXED.parts[1].articles.length, 1); + }); + it('should support articles', function() { assert.equal(PART.articles[0].articles.length, 2); assert.equal(PART.articles[1].articles.length, 0); |