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

Function test_findIndex_check_index

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

Source from the content-addressed store, hash-verified

2013
2014
2015def test_findIndex_check_index():
2016 items = [4, 2, 6, 7]
2017 result = ['']
2018 pm.eval("(result, arr) => {arr.findIndex((x, index) => result[0] += index)}")(result, items)
2019 assert items == [4, 2, 6, 7]
2020 assert result[0] == '0123'
2021
2022
2023def test_findIndex_check_array():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected