diff options
Diffstat (limited to 'lib/output/__tests__/website.js')
-rw-r--r-- | lib/output/__tests__/website.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/output/__tests__/website.js b/lib/output/__tests__/website.js index 0415fbb..501503a 100644 --- a/lib/output/__tests__/website.js +++ b/lib/output/__tests__/website.js @@ -44,6 +44,20 @@ describe('WebsiteGenerator', function() { expect(html).toHaveDOMElement('.page-inner a[href="../GLOSSARY.html#hello"]'); }); + it('should accept a custom glossary file', function() { + return generateMock(WebsiteGenerator, { + 'README.md': 'Hello World', + 'book.json': '{ "structure": { "glossary": "custom.md" } }', + 'custom.md': '# Glossary\n\n## Hello\n\nHello World' + }) + .then(function(folder) { + expect(folder).toHaveFile('custom.html'); + expect(folder).toNotHaveFile('GLOSSARY.html'); + + var html = fs.readFileSync(folder + '/index.html', 'utf8'); + expect(html).toHaveDOMElement('.page-inner a[href="custom.html#hello"]'); + }); + }); }); |