summaryrefslogtreecommitdiffstats
path: root/test/json.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-09-15 14:21:27 +0200
committerSamy Pessé <samypesse@gmail.com>2015-09-15 14:21:27 +0200
commit6732957e42350b3aefa4b1c80371baea92950651 (patch)
tree1605473bf22c7e4ab90a6cc9bebf5cb807fa1d90 /test/json.js
parent5f56098ae7fae80a4dd75a944c38201560b480c6 (diff)
parent1fd00068595dfced5a0f16ac05ae2553d09608bc (diff)
downloadgitbook-6732957e42350b3aefa4b1c80371baea92950651.zip
gitbook-6732957e42350b3aefa4b1c80371baea92950651.tar.gz
gitbook-6732957e42350b3aefa4b1c80371baea92950651.tar.bz2
Merge pull request #930 from GitbookIO/jshint
Add config for jshint and fix lint errors
Diffstat (limited to 'test/json.js')
-rw-r--r--test/json.js32
1 files changed, 16 insertions, 16 deletions
diff --git a/test/json.js b/test/json.js
index 758cfd7..311c80a 100644
--- a/test/json.js
+++ b/test/json.js
@@ -1,8 +1,8 @@
-var fs = require('fs');
-var path = require('path');
+var fs = require("fs");
+var path = require("path");
-describe('JSON generator', function () {
- describe('Basic Book', function() {
+describe("JSON generator", function () {
+ describe("Basic Book", function() {
var book;
before(function() {
@@ -12,15 +12,15 @@ describe('JSON generator', function () {
});
});
- it('should correctly output a README.json', function() {
+ it("should correctly output a README.json", function() {
book.should.have.file("README.json");
});
- it('should output a valid json', function() {
+ it("should output a valid json", function() {
book.should.have.jsonfile("README.json");
});
- describe('Page Format', function() {
+ describe("Page Format", function() {
var page;
before(function() {
@@ -32,25 +32,25 @@ describe('JSON generator', function () {
);
});
- it('should contains valid section', function() {
+ it("should contains valid section", function() {
page.should.have.property("sections").with.lengthOf(1);
- page.sections[0].should.have.property("content").which.is.a.String;
+ page.sections[0].should.have.property("content").which.is.a.String();
page.sections[0].should.have.property("type", "normal");
});
- it('should contains valid progress', function() {
+ it("should contains valid progress", function() {
page.should.have.property("progress");
page.progress.should.have.property("chapters").with.lengthOf(1);
page.progress.should.have.property("current");
});
- it('should contains no languages', function() {
+ it("should contains no languages", function() {
page.should.have.property("langs").with.lengthOf(0);
});
});
});
- describe('Multilingual Book', function() {
+ describe("Multilingual Book", function() {
var book;
before(function() {
@@ -60,19 +60,19 @@ describe('JSON generator', function () {
});
});
- it('should correctly output READMEs', function() {
+ it("should correctly output READMEs", function() {
book.should.have.file("README.json");
book.should.have.file("en/README.json");
book.should.have.file("fr/README.json");
});
- it('should output valid json', function() {
+ it("should output valid json", function() {
book.should.have.jsonfile("README.json");
book.should.have.jsonfile("en/README.json");
book.should.have.jsonfile("fr/README.json");
});
- describe('Page Format', function() {
+ describe("Page Format", function() {
var page;
before(function() {
@@ -84,7 +84,7 @@ describe('JSON generator', function () {
);
});
- it('should contains no languages', function() {
+ it("should contains no languages", function() {
page.should.have.property("langs").with.lengthOf(2);
});
});