()
| 2189 | |
| 2190 | |
| 2191 | def test_flatMap_no_replace(): |
| 2192 | items = [1, 2, [4, 5]] |
| 2193 | result = [0] |
| 2194 | pm.eval("(result, arr) => {result[0] = arr.flatMap((num) => (num === 2 ? [2, 2] : 1))}")(result, items) |
| 2195 | assert items == [1, 2, [4, 5]] |
| 2196 | assert result[0] == [1, 2, 2, 1] |
| 2197 | |
| 2198 | |
| 2199 | def test_flatMap_no_replace_depth_one(): |
nothing calls this directly
no outgoing calls
no test coverage detected