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

Function test_indexOf

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

Source from the content-addressed store, hash-verified

345
346
347def test_indexOf():
348 items = [1, 2, 3, 1]
349 result = [None]
350 pm.eval("(result, arr) => {result[0] = arr.indexOf(1)}")(result, items)
351 assert result[0] == 0
352
353
354def test_indexOf_with_start():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected