mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 02:17:50 +00:00
Add another _.size string value unit test.
Former-commit-id: 01c3bc51259c04a04f07d0e60398a0b2aa781641
This commit is contained in:
14
test/test.js
14
test/test.js
@@ -1987,10 +1987,6 @@
|
|||||||
(function() {
|
(function() {
|
||||||
var args = arguments;
|
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() {
|
test('should allow a falsey `object` argument', function() {
|
||||||
_.each(falsey, function(index, value) {
|
_.each(falsey, function(index, value) {
|
||||||
try {
|
try {
|
||||||
@@ -2014,6 +2010,16 @@
|
|||||||
test('fixes the JScript [[DontEnum]] bug (test in IE < 9)', function() {
|
test('fixes the JScript [[DontEnum]] bug (test in IE < 9)', function() {
|
||||||
equal(_.size(shadowed), 7);
|
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));
|
}(1, 2, 3));
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user