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

Function test_map_too_few_args

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

Source from the content-addressed store, hash-verified

1163
1164
1165def test_map_too_few_args():
1166 items = [4, 2, 6, 7]
1167 try:
1168 pm.eval("(arr) => {arr.map()}")(items)
1169 assert (False)
1170 except Exception as e:
1171 assert str(type(e)) == "<class 'pythonmonkey.SpiderMonkeyError'>"
1172 assert str(e).__contains__("TypeError: map: At least 1 argument required, but only 0 passed")
1173
1174
1175def test_map_arg_wrong_type():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected