diff options
| author | Igor Minar | 2011-03-27 16:19:03 -0700 | 
|---|---|---|
| committer | Igor Minar | 2011-03-30 15:24:03 -0700 | 
| commit | a4863d52448170a8b94fa1fd2df79af1b66b6ad1 (patch) | |
| tree | 42efebd35b150bdc70deac59e69e77377951d330 /test/AngularSpec.js | |
| parent | 96a1df192a167e6e34988af687693506f4efd1d1 (diff) | |
| download | angular.js-a4863d52448170a8b94fa1fd2df79af1b66b6ad1.tar.bz2 | |
correct size() impl for object's w/ 'length' prop
the original implementation returned incorrect value value for
objects with 'length' property.
Diffstat (limited to 'test/AngularSpec.js')
| -rw-r--r-- | test/AngularSpec.js | 4 | 
1 files changed, 4 insertions, 0 deletions
| diff --git a/test/AngularSpec.js b/test/AngularSpec.js index 0a290381..61dc7cfc 100644 --- a/test/AngularSpec.js +++ b/test/AngularSpec.js @@ -133,6 +133,10 @@ describe('angular', function(){        expect(size('')).toBe(0);        expect(size('abc')).toBe(3);      }); + +    it('should not rely on length property of an object to determine its size', function() { +      expect(size({length:99})).toBe(1); +    });    }); | 
