summaryrefslogtreecommitdiffstats
path: root/test/navigation.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/navigation.js
parent5a205346e3d125b1c834220ce98a206d88697811 (diff)
downloadgitbook-1fd00068595dfced5a0f16ac05ae2553d09608bc.zip
gitbook-1fd00068595dfced5a0f16ac05ae2553d09608bc.tar.gz
gitbook-1fd00068595dfced5a0f16ac05ae2553d09608bc.tar.bz2
Lint all tests
Diffstat (limited to 'test/navigation.js')
-rw-r--r--test/navigation.js44
1 files changed, 22 insertions, 22 deletions
diff --git a/test/navigation.js b/test/navigation.js
index ddcc86e..9118b3c 100644
--- a/test/navigation.js
+++ b/test/navigation.js
@@ -1,6 +1,6 @@
-var should = require('should');
+var should = require("should");
-describe('Navigation', function () {
+describe("Navigation", function () {
var book;
before(function() {
@@ -10,52 +10,52 @@ describe('Navigation', function () {
});
});
- it('should correctly parse navigation as a map', function() {
+ it("should correctly parse navigation as a map", function() {
book.should.have.property("navigation");
book.navigation.should.have.property("README.md");
book.navigation.should.have.property("README.md");
});
- it('should correctly include filenames', function() {
+ it("should correctly include filenames", function() {
book.navigation.should.have.property("README.md");
book.navigation.should.have.property("PAGE1.md");
book.navigation.should.have.property("folder/PAGE2.md");
book.navigation.should.not.have.property("NOTFOUND.md");
});
- it('should correctly detect next/prev for README', function() {
- var README = book.navigation['README.md'];
+ it("should correctly detect next/prev for README", function() {
+ var README = book.navigation["README.md"];
README.index.should.equal(0);
- README.should.have.property('next');
+ README.should.have.property("next");
should(README.prev).not.be.ok();
- README.next.should.have.property('path');
- README.next.path.should.equal('PAGE1.md');
+ README.next.should.have.property("path");
+ README.next.path.should.equal("PAGE1.md");
});
- it('should correctly detect next/prev a page', function() {
- var PAGE = book.navigation['PAGE1.md'];
+ it("should correctly detect next/prev a page", function() {
+ var PAGE = book.navigation["PAGE1.md"];
PAGE.index.should.equal(1);
- PAGE.should.have.property('next');
- PAGE.should.have.property('prev');
+ PAGE.should.have.property("next");
+ PAGE.should.have.property("prev");
- PAGE.prev.should.have.property('path');
- PAGE.prev.path.should.equal('README.md');
+ PAGE.prev.should.have.property("path");
+ PAGE.prev.path.should.equal("README.md");
- PAGE.next.should.have.property('path');
- PAGE.next.path.should.equal('folder/PAGE2.md');
+ PAGE.next.should.have.property("path");
+ PAGE.next.path.should.equal("folder/PAGE2.md");
});
- it('should correctly detect next/prev for last page', function() {
- var PAGE = book.navigation['folder/PAGE2.md'];
+ it("should correctly detect next/prev for last page", function() {
+ var PAGE = book.navigation["folder/PAGE2.md"];
PAGE.index.should.equal(2);
- PAGE.should.have.property('prev');
+ PAGE.should.have.property("prev");
should(PAGE.next).not.be.ok();
- PAGE.prev.should.have.property('path');
- PAGE.prev.path.should.equal('PAGE1.md');
+ PAGE.prev.should.have.property("path");
+ PAGE.prev.path.should.equal("PAGE1.md");
});
});