Add tests for null paths in navigation

Unfinished chapters/articles should be put in navigation
This commit is contained in:
Aaron O'Mullan
2014-04-01 00:42:14 -07:00
parent e08b09f3cf
commit 6a63708939
2 changed files with 9 additions and 0 deletions
+3
View File
@@ -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
+6
View File
@@ -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]);
});
});