From b316e2fd704c2bf3544f36a9ef6e38cbefe7af11 Mon Sep 17 00:00:00 2001 From: cobbspur Date: Tue, 29 Oct 2013 20:16:59 +0000 Subject: [PATCH] improve layout of code to jslint standards in helpers unit tests --- core/test/unit/server_helpers_index_spec.js | 35 ++++++++++----------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/core/test/unit/server_helpers_index_spec.js b/core/test/unit/server_helpers_index_spec.js index f529e84a54..4e089ee7e9 100644 --- a/core/test/unit/server_helpers_index_spec.js +++ b/core/test/unit/server_helpers_index_spec.js @@ -41,7 +41,7 @@ describe('Core Helpers', function () { helpers.content .call( {html: html}, - {"hash":{"words": 2}} + {"hash": {"words": 2}} ) ); @@ -55,7 +55,7 @@ describe('Core Helpers', function () { helpers.content .call( {html: html}, - {"hash":{"characters": 8}} + {"hash": {"characters": 8}} ) ); @@ -70,14 +70,14 @@ describe('Core Helpers', function () { should.exist(handlebars.helpers.author); }); - it("Returns the full name of the author from the context",function() { - var data = {"author":{"name":"abc123"}}, + it("Returns the full name of the author from the context", function () { + var data = {"author": {"name": "abc123"}}, result = helpers.author.call(data); String(result).should.equal("abc123"); }); - it("Returns a blank string where author data is missing",function() { + it("Returns a blank string where author data is missing", function () { var data = {"author": null}, result = helpers.author.call(data); @@ -88,11 +88,11 @@ describe('Core Helpers', function () { describe('encode Helper', function () { - it('has loaded encode helper', function() { + it('has loaded encode helper', function () { should.exist(handlebars.helpers.encode); }); - it('can escape URI', function() { + it('can escape URI', function () { var uri = "$pecial!Charact3r(De[iver]y)Foo #Bar", expected = "%24pecial!Charact3r(De%5Biver%5Dy)Foo%20%23Bar", escaped = handlebars.helpers.encode(uri); @@ -196,16 +196,16 @@ describe('Core Helpers', function () { it('can render class for static page', function (done) { helpers.body_class.call({ - path: '/', - post: { - page: true - } - }).then(function (rendered) { - should.exist(rendered); - rendered.string.should.equal('home-template page'); + path: '/', + post: { + page: true + } + }).then(function (rendered) { + should.exist(rendered); + rendered.string.should.equal('home-template page'); - done(); - }, done); + done(); + }, done); }); }); @@ -242,7 +242,7 @@ describe('Core Helpers', function () { it('returns meta tag string', function (done) { helpers.ghost_head.call({version: "0.3.0"}).then(function (rendered) { should.exist(rendered); - rendered.string.should.equal('\n'); + rendered.string.should.equal('\n'); done(); }); @@ -268,7 +268,6 @@ describe('Core Helpers', function () { done(); }); - }); });