From a36964799be3d21163ba6350d862fced2bbd3437 Mon Sep 17 00:00:00 2001
From: Misko Hevery
Date: Fri, 15 Oct 2010 13:44:53 -0700
Subject: fixed lint warnings and one flaky test
---
src/Resource.js | 3 +--
src/scenario/HtmlUI.js | 14 +++++++-------
src/scenario/Runner.js | 12 ++++++------
3 files changed, 14 insertions(+), 15 deletions(-)
(limited to 'src')
diff --git a/src/Resource.js b/src/Resource.js
index bab1b800..570ce1f9 100644
--- a/src/Resource.js
+++ b/src/Resource.js
@@ -108,8 +108,7 @@ ResourceFactory.prototype = {
throw {status: status, response:response, message: status + ": " + response};
}
},
- action.verifyCache
- );
+ action.verifyCache);
return value;
};
diff --git a/src/scenario/HtmlUI.js b/src/scenario/HtmlUI.js
index 46c88837..a93ed1e3 100644
--- a/src/scenario/HtmlUI.js
+++ b/src/scenario/HtmlUI.js
@@ -31,9 +31,9 @@ angular.scenario.ui.Html.prototype.addSpec = function(spec) {
'
'
);
specContext = specContext.find('> .tests li:last');
- return new angular.scenario.ui.Html.Spec(specContext, spec.name,
+ return new angular.scenario.ui.Html.Spec(specContext, spec.name,
angular.bind(this, function(status) {
- var status = this.context.find('#status-legend .status-' + status);
+ status = this.context.find('#status-legend .status-' + status);
var parts = status.text().split(' ');
var value = (parts[0] * 1) + 1;
status.text(value + ' ' + parts[1]);
@@ -91,7 +91,7 @@ angular.scenario.ui.Html.Spec = function(context, name, doneFn) {
' ' +
'' +
'' +
- '
'
+ ''
);
context.find('> .test-info .test-name').text('it ' + name);
};
@@ -116,8 +116,8 @@ angular.scenario.ui.Html.Spec.prototype.addStep = function(name) {
angular.scenario.ui.Html.Spec.prototype.complete = function() {
this.context.removeClass('status-pending');
var endTime = new Date().getTime();
- this.context.find("> .test-info .timer-result")
- .text((endTime - this.startTime) + "ms");
+ this.context.find("> .test-info .timer-result").
+ text((endTime - this.startTime) + "ms");
};
/**
@@ -172,8 +172,8 @@ angular.scenario.ui.Html.Step = function(context, name, doneFn) {
angular.scenario.ui.Html.Step.prototype.complete = function() {
this.context.removeClass('status-pending');
var endTime = new Date().getTime();
- this.context.find(".timer-result")
- .text((endTime - this.startTime) + "ms");
+ this.context.find(".timer-result").
+ text((endTime - this.startTime) + "ms");
};
/**
diff --git a/src/scenario/Runner.js b/src/scenario/Runner.js
index 0267bb2d..ff20d1d1 100644
--- a/src/scenario/Runner.js
+++ b/src/scenario/Runner.js
@@ -43,8 +43,8 @@ angular.scenario.Runner.prototype.describe = function(name, body) {
* @param {String} Name of the block
* @param {Function} Body of the block
*/
-angular.scenario.Runner.prototype.it = function(name, body) {
- this.currentDescribe.it(name, body);
+angular.scenario.Runner.prototype.it = function(name, body) {
+ this.currentDescribe.it(name, body);
};
/**
@@ -54,7 +54,7 @@ angular.scenario.Runner.prototype.it = function(name, body) {
* @param {Function} Callback to execute
*/
angular.scenario.Runner.prototype.beforeEach = function(body) {
- this.currentDescribe.beforeEach(body);
+ this.currentDescribe.beforeEach(body);
};
/**
@@ -64,7 +64,7 @@ angular.scenario.Runner.prototype.beforeEach = function(body) {
* @param {Function} Callback to execute
*/
angular.scenario.Runner.prototype.afterEach = function(body) {
- this.currentDescribe.afterEach(body);
+ this.currentDescribe.afterEach(body);
};
/**
@@ -79,7 +79,7 @@ angular.scenario.Runner.prototype.run = function(ui, application, specRunnerClas
var specs = this.rootDescribe.getSpecs();
$root.application = application;
$root.ui = ui;
- $root.setTimeout = function() {
+ $root.setTimeout = function() {
return self.$window.setTimeout.apply(self.$window, arguments);
};
asyncForEach(specs, angular.bind(this, function(spec, specDone) {
@@ -88,7 +88,7 @@ angular.scenario.Runner.prototype.run = function(ui, application, specRunnerClas
angular.foreach(angular.scenario.dsl, angular.bind(this, function(fn, key) {
this.$window[key] = function() {
return fn.call($root).apply(angular.scope(runner), arguments);
- }
+ };
}));
runner.run(ui, spec, specDone);
}), specsDone || angular.noop);
--
cgit v1.2.3