diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/fixtures/test1/sub/test1.md | 2 | ||||
-rw-r--r-- | test/glossary.js | 12 |
2 files changed, 14 insertions, 0 deletions
diff --git a/test/fixtures/test1/sub/test1.md b/test/fixtures/test1/sub/test1.md index 6a6e788..d45a4dd 100644 --- a/test/fixtures/test1/sub/test1.md +++ b/test/fixtures/test1/sub/test1.md @@ -4,3 +4,5 @@ This is a relative link [test](../intro.md).  +This is a glossary link. + diff --git a/test/glossary.js b/test/glossary.js index 442f857..da2cbb1 100644 --- a/test/glossary.js +++ b/test/glossary.js @@ -19,4 +19,16 @@ describe('Glossary Generation', function () { assert($a.text() == "description"); }, done); }); + + it('should correctly replace glossary terms in sub pages', function(done) { + testGeneration(books[1], "website", function(output) { + var content = fs.readFileSync(path.join(output, "sub/test1.html"), { encoding: "utf8" }); + var $ = cheerio.load(content); + + var $body = $(".page-inner"); + var $a = $("a[href='../GLOSSARY.html#test']"); + assert($a.length == 1); + assert($a.text() == "a test text"); + }, done); + }); }); |