MCPcopy Create free account
hub / github.com/Distributive-Network/PythonMonkey / test_flatMap_check_index

Function test_flatMap_check_index

tests/python/test_arrays.py:2216–2221  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2214
2215
2216def test_flatMap_check_index():
2217 items = [4, 2, 6, 7]
2218 result = ['']
2219 pm.eval("(result, arr) => {arr.flatMap((x, index) => result[0] += index)}")(result, items)
2220 assert items == [4, 2, 6, 7]
2221 assert result[0] == '0123'
2222
2223
2224def test_flatMap_check_array():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected