summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-03-24 13:52:29 +0100
committerSamy Pessé <samypesse@gmail.com>2015-03-24 13:52:29 +0100
commitf775d41933efb3dbe47339f069097752667ee5b8 (patch)
tree773214e5691a72c6d3ae8ae7648613cbe919b426
parent7722e7bdfa440c70cf0490dbeff6b2a7f93bdc6e (diff)
downloadgitbook-f775d41933efb3dbe47339f069097752667ee5b8.zip
gitbook-f775d41933efb3dbe47339f069097752667ee5b8.tar.gz
gitbook-f775d41933efb3dbe47339f069097752667ee5b8.tar.bz2
Add base tests for ebook generation
-rw-r--r--test/ebook.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/ebook.js b/test/ebook.js
new file mode 100644
index 0000000..c9bb924
--- /dev/null
+++ b/test/ebook.js
@@ -0,0 +1,24 @@
+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/style.css");
+ });
+ });
+});