UNPKG
@kowo0403hk/lotide
Version:
latest (1.0.1)
1.0.1
1.0.0
lotide library by LHL Bootcamp student
github.com/kowo0403hk/lotide
kowo0403hk/lotide
@kowo0403hk/lotide
/
test
/
flattenTest.js
9 lines
(8 loc)
•
263 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
const
assert =
require
(
'chai'
).
assert
;
const
flatten =
require
(
'../flatten'
);
describe
(
'#flatten'
,
() =>
{
it
(
'should flatten a nested array'
,
() =>
{
let
nested = [
1
,
2
, [
3
,
4
],
5
, [
6
]]; assert.
deepEqual
(
flatten
(nested), [
1
,
2
,
3
,
4
,
5
,
6
]); }); });