summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/fixtures/PAGE.MD2
-rw-r--r--test/summary.js9
2 files changed, 11 insertions, 0 deletions
diff --git a/test/fixtures/PAGE.MD b/test/fixtures/PAGE.MD
index 79fc10c..2839e6d 100644
--- a/test/fixtures/PAGE.MD
+++ b/test/fixtures/PAGE.MD
@@ -28,3 +28,5 @@ assert(c, 3)
Some more nice content ....
[Cool stuff](http://gitbook.io)
+
+[Link to another Markdown file](./xyz/file.md)
diff --git a/test/summary.js b/test/summary.js
index 2a1af96..5439182 100644
--- a/test/summary.js
+++ b/test/summary.js
@@ -31,4 +31,13 @@ describe('Summary parsing', function () {
assert(LEXED.chapters[1].chapter.title);
assert(LEXED.chapters[2].chapter.title);
});
+
+ it('should normalize paths from .md to .html', function() {
+ assert.equal(LEXED.chapters[0].chapter.path,'chapter-1/README.html');
+ assert.equal(LEXED.chapters[0].chapter._path,'chapter-1/README.md');
+ assert.equal(LEXED.chapters[1].chapter.path,'chapter-2/README.html');
+ assert.equal(LEXED.chapters[1].chapter._path,'chapter-2/README.md');
+ assert.equal(LEXED.chapters[2].chapter.path,'chapter-3/README.html');
+ assert.equal(LEXED.chapters[2].chapter._path,'chapter-3/README.md');
+ });
});