diff options
Diffstat (limited to 'test/ngMock/angular-mocksSpec.js')
| -rw-r--r-- | test/ngMock/angular-mocksSpec.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/ngMock/angular-mocksSpec.js b/test/ngMock/angular-mocksSpec.js index ef7e88fa..6c096471 100644 --- a/test/ngMock/angular-mocksSpec.js +++ b/test/ngMock/angular-mocksSpec.js @@ -862,6 +862,23 @@ describe('ngMock', function() { expect(log).toEqual('module;inject;') }); }); + + // We don't run the following tests on IE8. + // IE8 throws "Object does not support this property or method." error, + // when thrown from a function defined on window (which `inject` is). + if (msie <= 8) return; + + it('should not change thrown Errors', function() { + expect(function(){ + throw new Error('test message'); + }).toThrow('test message'); + }); + + it('should not change thrown strings', function(){ + expect(function(){ + throw 'test message'; + }).toThrow('test message'); + }); }); }); |
