diff options
author | Aaron O'Mullan <aaron.omullan@friendco.de> | 2014-03-31 11:58:31 -0700 |
---|---|---|
committer | Aaron O'Mullan <aaron.omullan@friendco.de> | 2014-03-31 11:58:31 -0700 |
commit | bd7531f3cc848e1410e0f0bb6d22cba0a90972d8 (patch) | |
tree | ed278b880edf31dfa2c7a5227ab06b22745d9e26 /test/summary.js | |
parent | 75073d47a2bd0401cc66d2e3c1692c31917e6a4c (diff) | |
download | gitbook-bd7531f3cc848e1410e0f0bb6d22cba0a90972d8.zip gitbook-bd7531f3cc848e1410e0f0bb6d22cba0a90972d8.tar.gz gitbook-bd7531f3cc848e1410e0f0bb6d22cba0a90972d8.tar.bz2 |
Add tests for path normalization
.md to .html
Diffstat (limited to 'test/summary.js')
-rw-r--r-- | test/summary.js | 9 |
1 files changed, 9 insertions, 0 deletions
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'); + }); }); |