Add sparse array test for _#concat.

This commit is contained in:
jdalton
2015-06-02 07:47:18 -07:00
parent 612bfd3acc
commit 1b4f210d82

View File

@@ -17173,6 +17173,23 @@
QUnit.module('lodash(...).concat');
(function() {
test('should treat sparse arrays as dense', 3, function() {
if (!isNpm) {
var expected = [],
wrapped = _(Array(1)).concat(Array(1)),
actual = wrapped.value();
expected.push(undefined, undefined);
ok('0'in actual);
ok('1' in actual);
deepEqual(actual, expected);
}
else {
skipTest(3);
}
});
test('should return a new wrapped array', 3, function() {
if (!isNpm) {
var array = [1],