Add another _.size string value unit test.

Former-commit-id: 01c3bc51259c04a04f07d0e60398a0b2aa781641
This commit is contained in:
John-David Dalton
2013-02-06 08:42:22 -08:00
parent d2ba0d4e7a
commit d28036ee91

View File

@@ -1987,10 +1987,6 @@
(function() {
var args = arguments;
test('should detect the size of a string value', function() {
equal(_.size('abc'), 3);
});
test('should allow a falsey `object` argument', function() {
_.each(falsey, function(index, value) {
try {
@@ -2014,6 +2010,16 @@
test('fixes the JScript [[DontEnum]] bug (test in IE < 9)', function() {
equal(_.size(shadowed), 7);
});
_.each({
'literal': 'abc',
'object': Object('abc')
},
function(collection, key) {
test('should work with a string ' + key + ' for `collection`', function() {
deepEqual(_.size(collection), 3);
});
});
}(1, 2, 3));