diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/AngularSpec.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/AngularSpec.js b/test/AngularSpec.js index 36d4926e..7fe65f4c 100644 --- a/test/AngularSpec.js +++ b/test/AngularSpec.js @@ -504,6 +504,21 @@ describe('angular', function() { expect(log).toEqual(['0:a', '1:c']); }); + if (document.querySelectorAll) { + it('should handle the result of querySelectorAll in IE8 as it has no hasOwnProperty function', function() { + document.body.innerHTML = "<p>" + + "<a name='x'>a</a>" + + "<a name='y'>b</a>" + + "<a name='x'>c</a>" + + "</p>"; + + var htmlCollection = document.querySelectorAll('[name="x"]'), + log = []; + + forEach(htmlCollection, function(value, key) { log.push(key + ':' + value.innerHTML)}); + expect(log).toEqual(['0:a', '1:c']); + }); + } it('should handle arguments objects like arrays', function() { var args, |
