hifi-boot.js: Coding convention update

This commit is contained in:
Anthony J. Thibault 2016-04-18 09:49:09 -07:00
parent 9ab3255285
commit efb6a5c3f6

View file

@ -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;
}
}());