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

Function test_forEach_too_few_args

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

Source from the content-addressed store, hash-verified

1103
1104
1105def test_forEach_too_few_args():
1106 items = [4, 2, 6, 7]
1107 try:
1108 pm.eval("(arr) => {arr.forEach()}")(items)
1109 assert (False)
1110 except Exception as e:
1111 assert str(type(e)) == "<class 'pythonmonkey.SpiderMonkeyError'>"
1112 assert str(e).__contains__("TypeError: forEach: At least 1 argument required, but only 0 passed")
1113
1114# map
1115

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected