diff options
| author | Caitlin Potter | 2014-03-19 23:48:47 -0400 | 
|---|---|---|
| committer | Tobias Bosch | 2014-03-21 13:05:29 -0700 | 
| commit | ad128e09ff0f5837d659f0b9d0bf304446f46044 (patch) | |
| tree | 60e46baf12bb59151e36ce00a85023deec1484b6 | |
| parent | 187b4adbd2d2dce412e42aa9f99d35aca785479f (diff) | |
| download | angular.js-ad128e09ff0f5837d659f0b9d0bf304446f46044.tar.bz2 | |
test($rootScope): add assertion to test ensuring that NaN -> NaN does not throw
https://github.com/angular/angular.js/commit/fb6062fb9d83545730b993e94ac7482ffd43a62c implements a
fix for NaN values causing $watchCollection to throw an infdig error. This change updates the test
by adding an assertion which explains what is actually being tested a bit better, and may also
provide better information in the event that the test ever fails.
Closes #6758
| -rw-r--r-- | test/ng/rootScopeSpec.js | 4 | 
1 files changed, 3 insertions, 1 deletions
| diff --git a/test/ng/rootScopeSpec.js b/test/ng/rootScopeSpec.js index 2ea41489..86436ea8 100644 --- a/test/ng/rootScopeSpec.js +++ b/test/ng/rootScopeSpec.js @@ -605,7 +605,9 @@ describe('Scope', function() {          it('should not infinitely digest when current value is NaN', function() {            $rootScope.obj = [NaN]; -          $rootScope.$digest(); +          expect(function() { +            $rootScope.$digest(); +          }).not.toThrow();          });          it('should watch array-like objects like arrays', function () { | 
