Skip to content
This repository was archived by the owner on Feb 20, 2019. It is now read-only.

Commit 031ab8d

Browse files
ShenseyeKent C. Dodds
authored andcommitted
test(flatten): Add a test for deep flatten (#12)
Closes #6
1 parent b9d3026 commit 031ab8d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/flatten.test.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,10 @@ test('flattens multiple arrays', t => {
1616
const actual = flatten(original1, original2, original3)
1717
t.deepEqual(actual, expected)
1818
})
19+
20+
test('deep flattens an array of arrays', t => {
21+
const original = [1, 2, [3, 4, [5, 6], 7], 8]
22+
const expected = [1, 2, 3, 4, 5, 6, 7, 8]
23+
const actual = flatten(original)
24+
t.same(actual, expected)
25+
})

0 commit comments

Comments
 (0)