Add _.flatMap test.

This commit is contained in:
John-David Dalton
2015-11-21 00:16:23 -08:00
parent 21b5139d98
commit ce4c6ec755

View File

@@ -5041,6 +5041,22 @@
/*--------------------------------------------------------------------------*/
QUnit.module('lodash.flatMap');
(function() {
QUnit.test('should map values in `array` to a new flattened array', function(assert) {
assert.expect(1);
var actual = _.flatMap([1, 2], function(n) {
return [n, n];
});
assert.deepEqual(actual, [1, 1, 2, 2]);
});
}());
/*--------------------------------------------------------------------------*/
QUnit.module('flatten methods');
(function() {