From 1b5097eefc09fda20a59429f41a30779b9e7bb93 Mon Sep 17 00:00:00 2001 From: Matthew Ouyang Date: Thu, 16 Jan 2014 04:35:10 -0500 Subject: [PATCH 1/2] semicolons because Douglas Crockford said so! --- test/core.js | 6 +++--- test/jasmine-test/spec/renderTestSpec.js | 2 +- test/uutest.js | 18 +++++++++--------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/test/core.js b/test/core.js index 34ca537..dabb9fa 100644 --- a/test/core.js +++ b/test/core.js @@ -9,7 +9,7 @@ exports.coreSetup = function(suite, auto) { suite.test("base context", function() { var base = dust.makeBase({ - sayHello: function() { return "Hello!" } + sayHello: function() { return "Hello!"; } }); testRender(this, "{sayHello} {foo}", base.push({foo: "bar"}), "Hello! bar"); }); @@ -78,7 +78,7 @@ exports.coreSetup = function(suite, auto) { end: function () { unit.pass(); } - }) + }); }); suite.test("tap (plain text string literal)", function() { @@ -260,7 +260,7 @@ exports.coreSetup = function(suite, auto) { unit.pass(); }); }); -} +}; function testRender(unit, source, context, expected, error) { var name = unit.id; diff --git a/test/jasmine-test/spec/renderTestSpec.js b/test/jasmine-test/spec/renderTestSpec.js index 665613c..b2c9782 100644 --- a/test/jasmine-test/spec/renderTestSpec.js +++ b/test/jasmine-test/spec/renderTestSpec.js @@ -59,7 +59,7 @@ function stream(test) { expect(output).toEqual(test.expected); } }); - } + }; }; function pipe(test) { diff --git a/test/uutest.js b/test/uutest.js index 79aa7a8..b5bccc4 100644 --- a/test/uutest.js +++ b/test/uutest.js @@ -17,7 +17,7 @@ Test.prototype.run = function() { } catch(err) { self.fail(err); } -} +}; Test.prototype.equals = function(actual, expected, message) { if (actual !== expected) { @@ -25,21 +25,21 @@ Test.prototype.equals = function(actual, expected, message) { if (message) err.message = message; throw wrapAssertionError(err, actual, expected, "==="); } -} +}; Test.prototype.ifError = function(err) { if (err) throw err; -} +}; Test.prototype.pass = function() { clearTimeout(this.timer); this.callback(); -} +}; Test.prototype.fail = function(err) { clearTimeout(this.timer); this.callback(err); -} +}; uutest.Test = Test; @@ -62,7 +62,7 @@ Suite.prototype.test = function(name, fn) { self.pending--; self.check(); })); -} +}; Suite.prototype.run = function() { if (this.pending) return; @@ -74,7 +74,7 @@ Suite.prototype.run = function() { for (var i=0; i Date: Thu, 16 Jan 2014 14:42:08 -0500 Subject: [PATCH 2/2] add repo collab from smfoote --- test/jasmine-test/spec/renderTestSpec.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/jasmine-test/spec/renderTestSpec.js b/test/jasmine-test/spec/renderTestSpec.js index b2c9782..349152b 100644 --- a/test/jasmine-test/spec/renderTestSpec.js +++ b/test/jasmine-test/spec/renderTestSpec.js @@ -47,11 +47,11 @@ function stream(test) { flag= true; } }); - + waitsFor(function(){ return flag; }, "the output", 500); - + runs(function(){ if (test.error) { expect(output).toEqual(test.error || {} ); @@ -87,11 +87,11 @@ function pipe(test) { flag= true; } }); - + waitsFor(function(){ return flag; }, "the output", 500); - + runs(function(){ if (test.error) { expect(output).toEqual(test.error || {}); @@ -99,5 +99,5 @@ function pipe(test) { expect(output).toEqual(test.expected); } }); - } + }; }; \ No newline at end of file