diff options
Diffstat (limited to 'test/AngularSpec.js')
| -rw-r--r-- | test/AngularSpec.js | 14 | 
1 files changed, 14 insertions, 0 deletions
| diff --git a/test/AngularSpec.js b/test/AngularSpec.js index a97c7591..c1914947 100644 --- a/test/AngularSpec.js +++ b/test/AngularSpec.js @@ -417,6 +417,20 @@ describe('angular', function() {      }); +    it('should not break if obj is an array we override hasOwnProperty', function() { +      var obj = []; +      obj[0] = 1; +      obj[1] = 2; +      obj.hasOwnProperty = null; +      var log = []; +      forEach(obj, function(value, key) { +        log.push(key + ':' + value); +      }); +      expect(log).toEqual(['0:1', '1:2']); +    }); + + +      it('should handle JQLite and jQuery objects like arrays', function() {        var jqObject = jqLite("<p><span>s1</span><span>s2</span></p>").find("span"),            log = []; | 
