summaryrefslogtreecommitdiffstats
path: root/test/summary.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-09-15 14:20:32 +0200
committerSamy Pessé <samypesse@gmail.com>2015-09-15 14:20:32 +0200
commit1fd00068595dfced5a0f16ac05ae2553d09608bc (patch)
tree1605473bf22c7e4ab90a6cc9bebf5cb807fa1d90 /test/summary.js
parent5a205346e3d125b1c834220ce98a206d88697811 (diff)
downloadgitbook-1fd00068595dfced5a0f16ac05ae2553d09608bc.zip
gitbook-1fd00068595dfced5a0f16ac05ae2553d09608bc.tar.gz
gitbook-1fd00068595dfced5a0f16ac05ae2553d09608bc.tar.bz2
Lint all tests
Diffstat (limited to 'test/summary.js')
-rw-r--r--test/summary.js24
1 files changed, 12 insertions, 12 deletions
diff --git a/test/summary.js b/test/summary.js
index 9c6df00..2d3a248 100644
--- a/test/summary.js
+++ b/test/summary.js
@@ -1,8 +1,8 @@
-var fs = require('fs');
-var path = require('path');
+var fs = require("fs");
+var path = require("path");
-describe('Summary', function () {
- describe('Parsing', function() {
+describe("Summary", function () {
+ describe("Parsing", function() {
var book;
before(function() {
@@ -12,13 +12,13 @@ describe('Summary', function () {
});
});
- it('should correctly list items', function() {
+ it("should correctly list items", function() {
book.should.have.property("summary");
book.summary.should.have.property("chapters");
book.summary.chapters.should.have.lengthOf(4);
});
- it('should correctly mark non-existant entries', function() {
+ it("should correctly mark non-existant entries", function() {
book.summary.chapters[0].exists.should.have.equal(true);
book.summary.chapters[1].exists.should.have.equal(true);
book.summary.chapters[2].exists.should.have.equal(true);
@@ -26,7 +26,7 @@ describe('Summary', function () {
});
});
- describe('Generation', function() {
+ describe("Generation", function() {
var book;
before(function() {
@@ -36,30 +36,30 @@ describe('Summary', function () {
});
});
- it('should create files according to summary', function() {
+ it("should create files according to summary", function() {
book.should.have.file("index.html");
book.should.have.file("PAGE1.html");
book.should.have.file("folder/PAGE2.html");
});
- it('should correctly output summary', function() {
+ it("should correctly output summary", function() {
var PAGE = fs.readFileSync(
path.join(book.options.output, "index.html"),
{ encoding: "utf-8" }
);
PAGE.should.be.html({
- ".book-summary .chapter[data-level='0'] a": {
+ ".book-summary .chapter[data-level=\"0\"] a": {
attributes: {
href: "./index.html"
}
},
- ".book-summary .chapter[data-level='1'] a": {
+ ".book-summary .chapter[data-level=\"1\"] a": {
attributes: {
href: "./PAGE1.html"
}
},
- ".book-summary .chapter[data-level='2'] a": {
+ ".book-summary .chapter[data-level=\"2\"] a": {
attributes: {
href: "./folder/PAGE2.html"
}