Skip to content

Commit ce4c6ec

Browse files
committed
Add _.flatMap test.
1 parent 21b5139 commit ce4c6ec

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test/test.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5041,6 +5041,22 @@
50415041

50425042
/*--------------------------------------------------------------------------*/
50435043

5044+
QUnit.module('lodash.flatMap');
5045+
5046+
(function() {
5047+
QUnit.test('should map values in `array` to a new flattened array', function(assert) {
5048+
assert.expect(1);
5049+
5050+
var actual = _.flatMap([1, 2], function(n) {
5051+
return [n, n];
5052+
});
5053+
5054+
assert.deepEqual(actual, [1, 1, 2, 2]);
5055+
});
5056+
}());
5057+
5058+
/*--------------------------------------------------------------------------*/
5059+
50445060
QUnit.module('flatten methods');
50455061

50465062
(function() {

0 commit comments

Comments
 (0)