summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/ebook.js42
-rw-r--r--test/website.js18
2 files changed, 30 insertions, 30 deletions
diff --git a/test/ebook.js b/test/ebook.js
index b065ae7..335699c 100644
--- a/test/ebook.js
+++ b/test/ebook.js
@@ -1,66 +1,66 @@
-var fs = require("fs");
-var path = require("path");
+var fs = require('fs');
+var path = require('path');
-describe("eBook generator", function () {
- describe("Basic Book", function() {
+describe('eBook generator', function () {
+ describe('Basic Book', function() {
var book;
before(function() {
- return books.generate("basic", "ebook")
+ 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 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");
+ it('should correctly copy assets', function() {
+ book.should.have.file('gitbook');
+ book.should.have.file('gitbook/ebook.css');
});
});
- describe("Custom styles", function() {
+ describe('Custom styles', function() {
var book;
before(function() {
- return books.generate("style-print", "ebook")
+ return books.generate('style-print', 'ebook')
.then(function(_book) {
book = _book;
});
});
- it("should remove default print.css", function() {
+ it('should remove default print.css', function() {
var PAGE = fs.readFileSync(
- path.join(book.options.output, "index.html"),
- { encoding: "utf-8" }
+ 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": {
+ 'link': {
count: 2
}
});
PAGE.should.be.html({
- "link[href=\"./styles/print.css\"]": {
+ 'link[href=\'./styles/print.css\']': {
count: 1
}
});
PAGE.should.be.html({
- "link[href=\"gitbook/plugins/gitbook-plugin-highlight/ebook.css\"]": {
+ 'link[href="gitbook/plugins/gitbook-plugin-highlight/ebook.css"]': {
count: 1
}
});
});
- it("should correctly print.css", function() {
- book.should.have.file("styles");
- book.should.have.file("styles/print.css");
+ it('should correctly copy print.css', function() {
+ book.should.have.file('styles');
+ book.should.have.file('styles/print.css');
});
});
});
diff --git a/test/website.js b/test/website.js
index ebbd18c..4b1c4de 100644
--- a/test/website.js
+++ b/test/website.js
@@ -1,22 +1,22 @@
-describe("Website generator", function () {
- describe("Basic Book", function() {
+describe('Website generator', function () {
+ describe('Basic Book', function() {
var book;
before(function() {
- return books.generate("basic", "website")
+ return books.generate('basic', 'website')
.then(function(_book) {
book = _book;
});
});
- it("should correctly output an index.html", function() {
- book.should.have.file("index.html");
+ it('should correctly output an index.html', function() {
+ book.should.have.file('index.html');
});
- it("should correctly copy assets", function() {
- book.should.have.file("gitbook");
- book.should.have.file("gitbook/app.js");
- book.should.have.file("gitbook/style.css");
+ it('should correctly copy assets', function() {
+ book.should.have.file('gitbook');
+ book.should.have.file('gitbook/app.js');
+ book.should.have.file('gitbook/website.css');
});
});
});