mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-21 10:03:31 +00:00
Add tests for null paths in navigation
Unfinished chapters/articles should be put in navigation
This commit is contained in:
Vendored
+3
@@ -5,3 +5,6 @@
|
||||
* [Article 2](chapter-1/ARTICLE2.md)
|
||||
* [Chapter 2](chapter-2/README.md)
|
||||
* [Chapter 3](chapter-3/README.md)
|
||||
* [Chapter 4](chapter-4/README.md)
|
||||
* Unfinished article
|
||||
* Unfinished Chapter
|
||||
|
||||
@@ -65,4 +65,10 @@ describe('Summary navigation', function() {
|
||||
assert.equal(nav['chapter-2/README.html'].level, '2');
|
||||
assert.equal(nav['chapter-3/README.html'].level, '3');
|
||||
});
|
||||
|
||||
it('should not accept null paths', function() {
|
||||
var nav = navigation(LEXED);
|
||||
|
||||
assert(!nav[null]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user