summaryrefslogtreecommitdiffstats
path: root/test/ebook.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/ebook.js')
-rw-r--r--test/ebook.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/test/ebook.js b/test/ebook.js
index c9bb924..9b353d2 100644
--- a/test/ebook.js
+++ b/test/ebook.js
@@ -21,4 +21,35 @@ describe('eBook generator', function () {
book.should.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 remove default print.css', function() {
+ var PAGE = fs.readFileSync(
+ path.join(book.options.output, "index.html"),
+ { encoding: "utf-8" }
+ );
+ PAGE.should.be.html({
+ "link": {
+ count: 1,
+ attributes: {
+ href: "./styles/print.css"
+ }
+ }
+ });
+ });
+
+ it('should correctly print.css', function() {
+ book.should.have.file("styles");
+ book.should.have.file("styles/print.css");
+ });
+ })
});