diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/AngularSpec.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/AngularSpec.js b/test/AngularSpec.js index 8fda7a65..bf952249 100644 --- a/test/AngularSpec.js +++ b/test/AngularSpec.js @@ -270,6 +270,14 @@ describe('angular', function() { expect(equals(new Date(0), 0)).toBe(false); expect(equals(0, new Date(0))).toBe(false); }); + + it('should correctly test for keys that are present on Object.prototype', function() { + // MS IE8 just doesn't work for this kind of thing, since "for ... in" doesn't return + // things like hasOwnProperty even if it is explicitly defined on the actual object! + if (msie<=8) return; + expect(equals({}, {hasOwnProperty: 1})).toBe(false); + expect(equals({}, {toString: null})).toBe(false); + }); }); describe('size', function() { |
