diff options
author | Samy Pesse <samypesse@gmail.com> | 2016-05-26 21:37:10 +0200 |
---|---|---|
committer | Samy Pesse <samypesse@gmail.com> | 2016-05-26 21:37:10 +0200 |
commit | 901328f247388198fff77f411377206222c89390 (patch) | |
tree | b260d737ab759916f9123f302468301d34064f12 /lib | |
parent | b47ebaa9d91ecc0a1a1678eb8da79837a3cfee19 (diff) | |
download | gitbook-901328f247388198fff77f411377206222c89390.zip gitbook-901328f247388198fff77f411377206222c89390.tar.gz gitbook-901328f247388198fff77f411377206222c89390.tar.bz2 |
Complete basic tests for glossary
Diffstat (limited to 'lib')
-rw-r--r-- | lib/output/__tests__/website.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/output/__tests__/website.js b/lib/output/__tests__/website.js index 9675e30..2c7ff58 100644 --- a/lib/output/__tests__/website.js +++ b/lib/output/__tests__/website.js @@ -31,14 +31,17 @@ describe('WebsiteGenerator', function() { }); it('should generate a GLOSSARY.html', function() { - console.log(fs.readdirSync(folder)); expect(folder).toHaveFile('GLOSSARY.html'); }); - it('should correctly resolve glossary links', function() { + it('should correctly resolve glossary links in README', function() { var html = fs.readFileSync(folder + '/index.html', 'utf8'); + expect(html).toHaveDOMElement('.page-inner a[href="GLOSSARY.html#hello"]'); + }); - console.log(html); + it('should correctly resolve glossary links in directory', function() { + var html = fs.readFileSync(folder + '/folder/page.html', 'utf8'); + expect(html).toHaveDOMElement('.page-inner a[href="../GLOSSARY.html#hello"]'); }); }); |