Skip to content

Commit 4b137d6

Browse files
kwchang0831BethanyGpetertseng
authored
flatten-array Add additional test cases (#1953)
* Add additional test cases to flatten-array * Update exercises/flatten-array/canonical-data.json Co-authored-by: Peter Tseng <[email protected]> Co-authored-by: BethanyG <[email protected]> Co-authored-by: Peter Tseng <[email protected]>
1 parent 76c0ba7 commit 4b137d6

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

exercises/flatten-array/canonical-data.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,38 @@
168168
2
169169
]
170170
},
171+
{
172+
"uuid": "c6cf26de-8ccd-4410-84bd-b9efd88fd2bc",
173+
"description": "consecutive null values at the front of the list are omitted from the final result",
174+
"property": "flatten",
175+
"input": {
176+
"array": [
177+
null,
178+
null,
179+
3
180+
]
181+
},
182+
"expected": [
183+
3
184+
]
185+
},
186+
{
187+
"uuid": "382c5242-587e-4577-b8ce-a5fb51e385a1",
188+
"description": "consecutive null values in the middle of the list are omitted from the final result",
189+
"property": "flatten",
190+
"input": {
191+
"array": [
192+
1,
193+
null,
194+
null,
195+
4
196+
]
197+
},
198+
"expected": [
199+
1,
200+
4
201+
]
202+
},
171203
{
172204
"uuid": "ef1d4790-1b1e-4939-a179-51ace0829dbd",
173205
"description": "6 level nest list with null values",

0 commit comments

Comments
 (0)