From ce4c6ec755150efb93c6e35e0e1bab10c56f7b6a Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sat, 21 Nov 2015 00:16:23 -0800 Subject: [PATCH] Add `_.flatMap` test. --- test/test.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/test.js b/test/test.js index 723e10db5..c94fcad89 100644 --- a/test/test.js +++ b/test/test.js @@ -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() {