()
| 2172 | |
| 2173 | |
| 2174 | def test_flatMap(): |
| 2175 | items = [1, 2, 1] |
| 2176 | result = [0] |
| 2177 | pm.eval("(result, arr) => {result[0] = arr.flatMap((num) => (num === 2 ? [2, 2] : 1))}")(result, items) |
| 2178 | assert items == [1, 2, 1] |
| 2179 | assert result[0] == [1, 2, 2, 1] |
| 2180 | |
| 2181 | |
| 2182 | def test_flatMap_with_js_array(): |
nothing calls this directly
no outgoing calls
no test coverage detected