aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorVojta Jina2011-11-04 17:15:03 -0700
committerIgor Minar2011-11-30 11:17:25 -0500
commitb9707d910e8dd354a2f684588c1e7d83c5f88b8a (patch)
tree2c6d1d375bad6785c16c1e4c00b60ad826c2c888 /test
parent5bbd64ac65a89f43ce30a948fc0e0f5442cacb1e (diff)
downloadangular.js-b9707d910e8dd354a2f684588c1e7d83c5f88b8a.tar.bz2
style(): get rid off some jsl warnings
Diffstat (limited to 'test')
-rw-r--r--test/angular-mocksSpec.js4
-rw-r--r--test/service/httpSpec.js34
2 files changed, 19 insertions, 19 deletions
diff --git a/test/angular-mocksSpec.js b/test/angular-mocksSpec.js
index e117c26d..30814985 100644
--- a/test/angular-mocksSpec.js
+++ b/test/angular-mocksSpec.js
@@ -697,8 +697,8 @@ describe('mocks', function() {
hb('POST', '/u1', 'ddd', noop, {});
- expect(function() {hb.verifyNoOutstandingExpectation();})
- .toThrow('Unsatisfied requests: GET /u2, POST /u3');
+ expect(function() {hb.verifyNoOutstandingExpectation();}).
+ toThrow('Unsatisfied requests: GET /u2, POST /u3');
});
diff --git a/test/service/httpSpec.js b/test/service/httpSpec.js
index a235426e..83a6e860 100644
--- a/test/service/httpSpec.js
+++ b/test/service/httpSpec.js
@@ -61,9 +61,9 @@ describe('$http', function() {
it('should log more exceptions', function() {
$httpBackend.expect('GET', '/url').respond(500, '');
- $http({url: '/url', method: 'GET'})
- .on('500', throwing('exception in error callback'))
- .on('5xx', throwing('exception in error callback'));
+ $http({url: '/url', method: 'GET'}).
+ on('500', throwing('exception in error callback')).
+ on('5xx', throwing('exception in error callback'));
$httpBackend.flush();
expect($exceptionHandler.errors.length).toBe(2);
@@ -491,7 +491,7 @@ describe('$http', function() {
beforeEach(function() {
$httpBackend.when('GET').respond(function(m, url) {
- return [parseInt(url.substr(1)), '', {}];
+ return [parseInt(url.substr(1), 10), '', {}];
});
});
@@ -550,13 +550,13 @@ describe('$http', function() {
it('should call all matched callbacks', function() {
var no = jasmine.createSpy('wrong');
- $http({method: 'GET', url: '/205'})
- .on('xxx', callback)
- .on('2xx', callback)
- .on('205', callback)
- .on('3xx', no)
- .on('2x1', no)
- .on('4xx', no);
+ $http({method: 'GET', url: '/205'}).
+ on('xxx', callback).
+ on('2xx', callback).
+ on('205', callback).
+ on('3xx', no).
+ on('2x1', no).
+ on('4xx', no);
$httpBackend.flush();
@@ -576,10 +576,10 @@ describe('$http', function() {
it('should preserve the order of listeners', function() {
var log = '';
- $http({method: 'GET', url: '/201'})
- .on('2xx', function() {log += '1';})
- .on('201', function() {log += '2';})
- .on('2xx', function() {log += '3';});
+ $http({method: 'GET', url: '/201'}).
+ on('2xx', function() {log += '1';}).
+ on('201', function() {log += '2';}).
+ on('2xx', function() {log += '3';});
$httpBackend.flush();
expect(log).toBe('123');
@@ -766,8 +766,8 @@ describe('$http', function() {
function second(d) {return d + '2';}
$httpBackend.expect('POST', '/url').respond('0');
- $http({method: 'POST', url: '/url', transformResponse: [first, second]})
- .on('200', callback);
+ $http({method: 'POST', url: '/url', transformResponse: [first, second]}).
+ on('200', callback);
$httpBackend.flush();
expect(callback).toHaveBeenCalledOnce();