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

Function test_findIndex_found_once

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

Source from the content-addressed store, hash-verified

1991
1992
1993def test_findIndex_found_once():
1994 items = [5, 12, 8, 130, 44]
1995 result = [0]
1996 pm.eval("(result, arr) => {result[0] = arr.findIndex((element) => element > 100)}")(result, items)
1997 assert items == [5, 12, 8, 130, 44]
1998 assert result[0] == 3
1999
2000
2001def test_findIndex_found_twice():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected