summaryrefslogtreecommitdiffstats
path: root/packages/gitbook-asciidoc/test/summary.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-01-24 11:36:21 +0100
committerSamy Pessé <samypesse@gmail.com>2016-12-22 11:46:16 +0100
commiteec1e34d0c037dbe319cdfefac6d0ca443b59d10 (patch)
tree9cf7c7b121edf7135cac356b7bc53d922e5571ba /packages/gitbook-asciidoc/test/summary.js
parent1590a8c22dfb124ae690f63fe6a3d11b172f1ee0 (diff)
downloadgitbook-eec1e34d0c037dbe319cdfefac6d0ca443b59d10.zip
gitbook-eec1e34d0c037dbe319cdfefac6d0ca443b59d10.tar.gz
gitbook-eec1e34d0c037dbe319cdfefac6d0ca443b59d10.tar.bz2
Don't add entry point to summary
Diffstat (limited to 'packages/gitbook-asciidoc/test/summary.js')
-rwxr-xr-xpackages/gitbook-asciidoc/test/summary.js17
1 files changed, 7 insertions, 10 deletions
diff --git a/packages/gitbook-asciidoc/test/summary.js b/packages/gitbook-asciidoc/test/summary.js
index 89bad91..1c444ce 100755
--- a/packages/gitbook-asciidoc/test/summary.js
+++ b/packages/gitbook-asciidoc/test/summary.js
@@ -9,13 +9,13 @@ var LEXED = summary(CONTENT);
describe('Summary parsing', function () {
it('should detect chapters', function() {
- assert.equal(LEXED.chapters.length, 6);
+ assert.equal(LEXED.chapters.length, 5);
});
it('should support articles', function() {
- assert.equal(LEXED.chapters[1].articles.length, 2);
+ assert.equal(LEXED.chapters[0].articles.length, 2);
+ assert.equal(LEXED.chapters[1].articles.length, 0);
assert.equal(LEXED.chapters[2].articles.length, 0);
- assert.equal(LEXED.chapters[3].articles.length, 0);
});
it('should detect paths and titles', function() {
@@ -23,21 +23,18 @@ describe('Summary parsing', function () {
assert(LEXED.chapters[1].path);
assert(LEXED.chapters[2].path);
assert(LEXED.chapters[3].path);
- assert(LEXED.chapters[4].path);
- assert.equal(LEXED.chapters[5].path, null);
+ assert.equal(LEXED.chapters[4].path, null);
assert(LEXED.chapters[0].title);
assert(LEXED.chapters[1].title);
assert(LEXED.chapters[2].title);
assert(LEXED.chapters[3].title);
assert(LEXED.chapters[4].title);
- assert(LEXED.chapters[5].title);
});
it('should normalize paths from .md', function() {
- assert.equal(LEXED.chapters[0].path,'README.adoc');
- assert.equal(LEXED.chapters[1].path,'chapter-1/README.adoc');
- assert.equal(LEXED.chapters[2].path,'chapter-2/README.adoc');
- assert.equal(LEXED.chapters[3].path,'chapter-3/README.adoc');
+ assert.equal(LEXED.chapters[0].path,'chapter-1/README.adoc');
+ assert.equal(LEXED.chapters[1].path,'chapter-2/README.adoc');
+ assert.equal(LEXED.chapters[2].path,'chapter-3/README.adoc');
});
});