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

Function test_findIndex_not_found

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

Source from the content-addressed store, hash-verified

2006
2007
2008def test_findIndex_not_found():
2009 items = [5, 12, 8, 130, 4]
2010 result = [0]
2011 pm.eval("(result, arr) => {result[0] = arr.findIndex((element) => element > 1000)}")(result, items)
2012 assert result[0] == -1
2013
2014
2015def test_findIndex_check_index():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected