feature(util) add forEach

This commit is contained in:
coderaiser 2014-05-22 07:17:39 -04:00
parent 7554d6c41a
commit 93b22b9fea
3 changed files with 41 additions and 9 deletions

View file

@ -138,6 +138,26 @@
});
describe('forEach', function() {
it('should call arrays forEach on any type', function() {
var str = '',
obj = {
0: 'a',
1: 'b',
2: 'c',
length: 3
};
Util.forEach(obj, function(item) {
str += item;
});
str.should.be.equal('abc');
});
});
});
})();