Skip to content

Commit e907c75

Browse files
committed
Updating test file
1 parent ea59e7b commit e907c75

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

exercises/practice/flatten-array/flatten-array.spec.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,21 @@ describe('FlattenArray', () => {
4040
expect(flatten([1, 2, null])).toEqual([1, 2]);
4141
});
4242

43-
xtest('6 level nest list with null values', () => {
43+
xtest('consecutive null values at the front of the array are omitted from the final result', () => {
44+
expect(flatten([null, null, 3])).toEqual([3]);
45+
});
46+
47+
xtest('consecutive null values in the middle of the array are omitted from the final result', () => {
48+
expect(flatten([1, null, null, 4])).toEqual([1, 4]);
49+
});
50+
51+
xtest('6 level nested array with null values', () => {
4452
expect(flatten([0, 2, [[2, 3], 8, [[100]], null, [[null]]], -2])).toEqual([
4553
0, 2, 2, 3, 8, 100, -2,
4654
]);
4755
});
4856

49-
xtest('all values in nested list are null', () => {
57+
xtest('all values in nested array are null', () => {
5058
expect(
5159
flatten([null, [[[null]]], null, null, [[null, null], null], null]),
5260
).toEqual([]);

0 commit comments

Comments
 (0)