aboutsummaryrefslogtreecommitdiffstats
path: root/test/scenario/HtmlUISpec.js
diff options
context:
space:
mode:
authorMisko Hevery2010-10-15 13:44:53 -0700
committerMisko Hevery2010-10-15 13:44:53 -0700
commita36964799be3d21163ba6350d862fced2bbd3437 (patch)
tree8c703eb9b19541c25c4e1105e511426a646c9c4d /test/scenario/HtmlUISpec.js
parentd320e3d2c3b72896603a3df3abd26adc0bfa3c10 (diff)
downloadangular.js-a36964799be3d21163ba6350d862fced2bbd3437.tar.bz2
fixed lint warnings and one flaky test
Diffstat (limited to 'test/scenario/HtmlUISpec.js')
-rw-r--r--test/scenario/HtmlUISpec.js44
1 files changed, 22 insertions, 22 deletions
diff --git a/test/scenario/HtmlUISpec.js b/test/scenario/HtmlUISpec.js
index b2e2652f..5b800fca 100644
--- a/test/scenario/HtmlUISpec.js
+++ b/test/scenario/HtmlUISpec.js
@@ -2,7 +2,7 @@ describe('angular.scenario.HtmlUI', function() {
var ui;
var context;
var spec;
-
+
beforeEach(function() {
spec = {
name: 'test spec',
@@ -20,18 +20,18 @@ describe('angular.scenario.HtmlUI', function() {
context = _jQuery("<div></div>");
ui = new angular.scenario.ui.Html(context);
});
-
+
it('should create nested describe context', function() {
ui.addSpec(spec);
- expect(context.find('#describe-20 #describe-10 > h2').text())
- .toEqual('describe: child');
+ expect(context.find('#describe-20 #describe-10 > h2').text()).
+ toEqual('describe: child');
expect(context.find('#describe-20 > h2').text()).toEqual('describe: parent');
- expect(context.find('#describe-10 .tests > li .test-info .test-name').text())
- .toEqual('it test spec');
- expect(context.find('#describe-10 .tests > li').hasClass('status-pending'))
- .toBeTruthy();
+ expect(context.find('#describe-10 .tests > li .test-info .test-name').text()).
+ toEqual('it test spec');
+ expect(context.find('#describe-10 .tests > li').hasClass('status-pending')).
+ toBeTruthy();
});
-
+
it('should update totals when steps complete', function() {
// Error
ui.addSpec(spec).error('error');
@@ -55,31 +55,31 @@ describe('angular.scenario.HtmlUI', function() {
specUI = ui.addSpec(spec);
specUI.addStep('some step').finish();
specUI.finish();
-
- expect(parseInt(context.find('#status-legend .status-failure').text()))
- .toEqual(3);
- expect(parseInt(context.find('#status-legend .status-error').text()))
- .toEqual(2);
- expect(parseInt(context.find('#status-legend .status-success').text()))
- .toEqual(1);
+
+ expect(parseInt(context.find('#status-legend .status-failure').text(), 10)).
+ toEqual(3);
+ expect(parseInt(context.find('#status-legend .status-error').text(), 10)).
+ toEqual(2);
+ expect(parseInt(context.find('#status-legend .status-success').text(), 10)).
+ toEqual(1);
});
-
+
it('should update timer when test completes', function() {
// Success
specUI = ui.addSpec(spec);
specUI.addStep('some step').finish();
specUI.finish();
-
+
// Failure
specUI = ui.addSpec(spec);
specUI.addStep('some step').finish('failure');
specUI.finish('failure');
-
+
// Error
specUI = ui.addSpec(spec).error('error');
-
- context.find('#describe-10 .tests > li .test-info .timer-result')
- .each(function(index, timer) {
+
+ context.find('#describe-10 .tests > li .test-info .timer-result').
+ each(function(index, timer) {
expect(timer.innerHTML).toMatch(/ms$/);
});
});