Ensure _.flatten handles empty arrays.

This commit is contained in:
John-David Dalton
2013-09-17 19:29:09 -07:00
parent 55f080e33f
commit 620866bc39
8 changed files with 17 additions and 8 deletions

View File

@@ -1336,6 +1336,11 @@
ok(pass);
}
});
test('should work with empty arrays', function() {
var actual = _.flatten([[], [[]], [[], [[[]]]]]);
deepEqual(actual, []);
});
}(1, 2, 3));
/*--------------------------------------------------------------------------*/