diff --git a/test/flatten-array.js b/test/flatten-array.js index c7f0632..e699460 100644 --- a/test/flatten-array.js +++ b/test/flatten-array.js @@ -2,7 +2,9 @@ describe('flatten array', function () { it('should flatten an array', function () { var arr = [1, 2, [1, 2, [3, 4, 5, [1]]], 2, [2]], expected = [1, 1, 1, 2, 2, 2, 2, 3, 4, 5]; + arr = arr.flat(Infinity); + arr.sort(); expect(arr).toEqual(expected); }); -}); \ No newline at end of file +});