diff --git a/test/ng/anchorScrollSpec.js b/test/ng/anchorScrollSpec.js index 22fb13608..b51566808 100644 --- a/test/ng/anchorScrollSpec.js +++ b/test/ng/anchorScrollSpec.js @@ -87,15 +87,7 @@ describe('$anchorScroll', function() { return function($window) { forEach(elmSpy, function(spy, id) { - var count = map[id] || 0; - // TODO(gkalpak): `toHaveBeenCalledTimes()` works correctly with 0 since - // https://github.com/jasmine/jasmine/commit/342f0eb9a38194ecb8559e7df872c72afc0fe52e - // Fix when we upgrade to a version that contains the fix. - if (count > 0) { - expect(spy).toHaveBeenCalledTimes(count); - } else { - expect(spy).not.toHaveBeenCalled(); - } + expect(spy).toHaveBeenCalledTimes(map[id] || 0); }); expect($window.scrollTo).not.toHaveBeenCalled(); }; @@ -401,14 +393,7 @@ describe('$anchorScroll', function() { return function($rootScope, $window) { inject(expectScrollingTo(identifierCountMap)); - // TODO(gkalpak): `toHaveBeenCalledTimes()` works correctly with 0 since - // https://github.com/jasmine/jasmine/commit/342f0eb9a38194ecb8559e7df872c72afc0fe52e - // Fix when we upgrade to a version that contains the fix. - if (list.length > 0) { - expect($window.scrollBy).toHaveBeenCalledTimes(list.length); - } else { - expect($window.scrollBy).not.toHaveBeenCalled(); - } + expect($window.scrollBy).toHaveBeenCalledTimes(list.length); forEach(list, function(offset, idx) { // Due to sub-pixel rendering, there is a +/-1 error margin in the actual offset var args = $window.scrollBy.calls.argsFor(idx);