Skip to content

Commit 6ccdccf

Browse files
committed
updates the flat unit tests
1 parent 49909f1 commit 6ccdccf

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test.lua

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,16 @@ test('flat', function(a)
259259
array.flat({ 'a', 'b', 'c', { 'd', 'e', 'f', { 'g', 'h' } }, { 'i' }, 'j' }),
260260
{ 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j' }
261261
)
262+
263+
a.deep_equal(
264+
array.flat({ 'a', 'b', 'c', { 'd', 'e', 'f', { 'g', 'h' } }, { 'i' }, 'j' }, 1),
265+
{ 'a', 'b', 'c', 'd', 'e', 'f', { 'g', 'h' }, 'i', 'j' }
266+
)
267+
268+
a.deep_equal(
269+
array.flat({ 'a', 'b', 'c', { 'd', 'e', { 'f', { 'g', 'h' } } }, { 'i' }, 'j' }, 2),
270+
{ 'a', 'b', 'c', 'd', 'e', 'f', { 'g', 'h' }, 'i', 'j' }
271+
)
262272
end)
263273

264274
test('fill', function(a)

0 commit comments

Comments
 (0)