From 5b8c78843e8d62a7a67cead8bf04c76aa8ee411d Mon Sep 17 00:00:00 2001 From: Daniel Luz Date: Thu, 22 Aug 2013 16:44:24 -0300 Subject: fix(isArrayLike): correctly handle string primitives Closes #3356 --- test/AngularSpec.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/AngularSpec.js') diff --git a/test/AngularSpec.js b/test/AngularSpec.js index f6796496..62ea31d9 100644 --- a/test/AngularSpec.js +++ b/test/AngularSpec.js @@ -461,6 +461,13 @@ describe('angular', function() { expect(log).toEqual(['0:a', '1:b', '2:c']); }); + it('should handle string values like arrays', function() { + var log = []; + + forEach('bar', function(value, key) { log.push(key + ':' + value)}); + expect(log).toEqual(['0:b', '1:a', '2:r']); + }); + it('should handle objects with length property as objects', function() { var obj = { -- cgit v1.2.3