diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-02-26 09:41:26 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-02-26 09:41:26 +0100 |
commit | d3d64f636c859f7f01a64f7774cf70bd8ccdc562 (patch) | |
tree | 4f7731f37c3a793d187b0ab1cd77680e69534c6c /test/ebook.js | |
parent | 4cb9cbb5ae3aa8f9211ffa3ac5e3d34232c0ca4f (diff) | |
parent | eef072693b17526347c37b66078a5059c71caa31 (diff) | |
download | gitbook-d3d64f636c859f7f01a64f7774cf70bd8ccdc562.zip gitbook-d3d64f636c859f7f01a64f7774cf70bd8ccdc562.tar.gz gitbook-d3d64f636c859f7f01a64f7774cf70bd8ccdc562.tar.bz2 |
Merge pull request #1109 from GitbookIO/3.0.0
Version 3.0.0
Diffstat (limited to 'test/ebook.js')
-rw-r--r-- | test/ebook.js | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/test/ebook.js b/test/ebook.js deleted file mode 100644 index 5caf28b..0000000 --- a/test/ebook.js +++ /dev/null @@ -1,70 +0,0 @@ -var fs = require('fs'); -var path = require('path'); - -describe('eBook generator', function () { - describe('Basic Book', function() { - var book; - - before(function() { - return books.generate('basic', 'ebook') - .then(function(_book) { - book = _book; - }); - }); - - it('should correctly output a SUMMARY.html', function() { - book.should.have.file('SUMMARY.html'); - }); - - it('should correctly copy assets', function() { - book.should.have.file('gitbook'); - book.should.have.file('gitbook/ebook.css'); - }); - - it('should not copy website assets', function() { - book.should.not.have.file('gitbook/style.css'); - }); - }); - - describe('Custom styles', function() { - var book; - - before(function() { - return books.generate('style-print', 'ebook') - .then(function(_book) { - book = _book; - }); - }); - - it('should correctly copy print.css', function() { - book.should.have.file('styles'); - book.should.have.file('styles/print.css'); - }); - - it('should remove default print.css', function() { - var PAGE = fs.readFileSync( - path.join(book.options.output, 'index.html'), - { encoding: 'utf-8' } - ); - - // There are 2 styles (one from plugin-highlight and the new style) - PAGE.should.be.html({ - 'link': { - count: 2 - } - }); - - PAGE.should.be.html({ - 'link[href=\'./styles/print.css\']': { - count: 1 - } - }); - - PAGE.should.be.html({ - 'link[href="gitbook/plugins/gitbook-plugin-highlight/ebook.css"]': { - count: 1 - } - }); - }); - }); -}); |