@@ -87,15 +87,7 @@ describe('$anchorScroll', function() {
87
87
88
88
return function ( $window ) {
89
89
forEach ( elmSpy , function ( spy , id ) {
90
- var count = map [ id ] || 0 ;
91
- // TODO(gkalpak): `toHaveBeenCalledTimes()` works correctly with 0 since
92
- // https://github.com/jasmine/jasmine/commit/342f0eb9a38194ecb8559e7df872c72afc0fe52e
93
- // Fix when we upgrade to a version that contains the fix.
94
- if ( count > 0 ) {
95
- expect ( spy ) . toHaveBeenCalledTimes ( count ) ;
96
- } else {
97
- expect ( spy ) . not . toHaveBeenCalled ( ) ;
98
- }
90
+ expect ( spy ) . toHaveBeenCalledTimes ( map [ id ] || 0 ) ;
99
91
} ) ;
100
92
expect ( $window . scrollTo ) . not . toHaveBeenCalled ( ) ;
101
93
} ;
@@ -401,14 +393,7 @@ describe('$anchorScroll', function() {
401
393
402
394
return function ( $rootScope , $window ) {
403
395
inject ( expectScrollingTo ( identifierCountMap ) ) ;
404
- // TODO(gkalpak): `toHaveBeenCalledTimes()` works correctly with 0 since
405
- // https://github.com/jasmine/jasmine/commit/342f0eb9a38194ecb8559e7df872c72afc0fe52e
406
- // Fix when we upgrade to a version that contains the fix.
407
- if ( list . length > 0 ) {
408
- expect ( $window . scrollBy ) . toHaveBeenCalledTimes ( list . length ) ;
409
- } else {
410
- expect ( $window . scrollBy ) . not . toHaveBeenCalled ( ) ;
411
- }
396
+ expect ( $window . scrollBy ) . toHaveBeenCalledTimes ( list . length ) ;
412
397
forEach ( list , function ( offset , idx ) {
413
398
// Due to sub-pixel rendering, there is a +/-1 error margin in the actual offset
414
399
var args = $window . scrollBy . calls . argsFor ( idx ) ;
0 commit comments