From efb6a5c3f6360ac26559ec31f232c0d35b4f18d0 Mon Sep 17 00:00:00 2001 From: "Anthony J. Thibault" Date: Mon, 18 Apr 2016 09:49:09 -0700 Subject: [PATCH] hifi-boot.js: Coding convention update --- examples/libraries/jasmine/hifi-boot.js | 78 +++++++++++++------------ 1 file changed, 40 insertions(+), 38 deletions(-) diff --git a/examples/libraries/jasmine/hifi-boot.js b/examples/libraries/jasmine/hifi-boot.js index 7815f392dd..0c66a925af 100644 --- a/examples/libraries/jasmine/hifi-boot.js +++ b/examples/libraries/jasmine/hifi-boot.js @@ -1,51 +1,53 @@ (function() { - function ConsoleReporter(options) { - this.jasmineStarted = function (obj) { - print("jasmineStarted: numSpecs = " + obj.totalSpecsDefined); - }; - this.jasmineDone = function (obj) { - print("jasmineDone"); - }; - this.suiteStarted = function(obj) { - print("suiteStarted: \"" + obj.fullName + "\""); - }; - this.suiteDone = function(obj) { - print("suiteDone: \"" + obj.fullName + "\" " + obj.status); - }; - this.specStarted = function(obj) { - print("specStarted: \"" + obj.fullName + "\""); - }; - this.specDone = function(obj) { - print("specDone: \"" + obj.fullName + "\" " + obj.status); + function ConsoleReporter(options) { + this.jasmineStarted = function (obj) { + print("jasmineStarted: numSpecs = " + obj.totalSpecsDefined); + }; + this.jasmineDone = function (obj) { + print("jasmineDone"); + }; + this.suiteStarted = function(obj) { + print("suiteStarted: \"" + obj.fullName + "\""); + }; + this.suiteDone = function(obj) { + print("suiteDone: \"" + obj.fullName + "\" " + obj.status); + }; + this.specStarted = function(obj) { + print("specStarted: \"" + obj.fullName + "\""); + }; + this.specDone = function(obj) { + print("specDone: \"" + obj.fullName + "\" " + obj.status); - var i, l = obj.failedExpectations.length; - for (i = 0; i < l; i++) { - print(" " + obj.failedExpectations[i].message); - } - }; - return this; - } + var i, l = obj.failedExpectations.length; + for (i = 0; i < l; i++) { + print(" " + obj.failedExpectations[i].message); + } + }; + return this; + } - setTimeout = Script.setTimeout; - setInterval = Script.setInterval; - clearTimeout = Script.clearTimeout; - clearInterval = Script.clearInterval; + setTimeout = Script.setTimeout; + setInterval = Script.setInterval; + clearTimeout = Script.clearTimeout; + clearInterval = Script.clearInterval; - var jasmine = jasmineRequire.core(jasmineRequire); + var jasmine = jasmineRequire.core(jasmineRequire); - var env = jasmine.getEnv(); + var env = jasmine.getEnv(); - env.addReporter(new ConsoleReporter()); + env.addReporter(new ConsoleReporter()); - var jasmineInterface = jasmineRequire.interface(jasmine, env); + var jasmineInterface = jasmineRequire.interface(jasmine, env); - extend(this, jasmineInterface); + extend(this, jasmineInterface); - function extend(destination, source) { - for (var property in source) destination[property] = source[property]; - return destination; - } + function extend(destination, source) { + for (var property in source) { + destination[property] = source[property]; + } + return destination; + } }());