summaryrefslogtreecommitdiffstats
path: root/test/navigation.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/navigation.js')
-rw-r--r--test/navigation.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/navigation.js b/test/navigation.js
index d34c12a..8f82911 100644
--- a/test/navigation.js
+++ b/test/navigation.js
@@ -14,18 +14,23 @@ describe('Summary navigation', function() {
it('should provide next & prev entries for a file', function() {
var nav = navigation(LEXED, [
'README.html',
+ 'chapter-1/README.html',
'chapter-1/ARTICLE1.html',
'chapter-1/ARTICLE2.html'
]);
// Make sure it found the files we gave it
assert(nav['README.html']);
+ assert(nav['chapter-1/README.html']);
assert(nav['chapter-1/ARTICLE1.html']);
assert(nav['chapter-1/ARTICLE2.html']);
assert.equal(nav['README.html'].prev, null);
assert.equal(nav['README.html'].next.path, 'chapter-1/README.html');
+ assert.equal(nav['chapter-1/README.html'].prev, null);
+ assert.equal(nav['chapter-1/README.html'].next.path, 'chapter-1/ARTICLE1.html');
+
assert.equal(nav['chapter-1/ARTICLE1.html'].prev.path, 'chapter-1/README.html');
assert.equal(nav['chapter-1/ARTICLE1.html'].next.path, 'chapter-1/ARTICLE2.html');