diff options
| author | Caitlin Potter | 2014-03-19 23:48:47 -0400 |
|---|---|---|
| committer | Caitlin Potter | 2014-03-20 17:53:03 -0400 |
| commit | 6011145cfe83ffec4c0e1616cc9892b3b35a9bb4 (patch) | |
| tree | c2e1397536b2155a2e683c2ae44cb8e89f93c3d7 | |
| parent | b26fc23b068b5de603b535e0ef63cb5deacf0789 (diff) | |
| download | angular.js-6011145cfe83ffec4c0e1616cc9892b3b35a9bb4.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 () { |
