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

Function test_findIndex_found_twice

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

Source from the content-addressed store, hash-verified

1999
2000
2001def test_findIndex_found_twice():
2002 items = [5, 12, 8, 130, 4]
2003 result = [0]
2004 pm.eval("(result, arr) => {result[0] = arr.findIndex((element) => element > 10)}")(result, items)
2005 assert result[0] == 1
2006
2007
2008def test_findIndex_not_found():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected