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

Function test_missing_func

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

Source from the content-addressed store, hash-verified

23
24
25def test_missing_func():
26 items = [1, 2, 3]
27 try:
28 pm.eval("(arr) => {arr.after()}")(items)
29 assert False
30 except Exception as e:
31 assert str(type(e)) == "<class 'pythonmonkey.SpiderMonkeyError'>"
32 assert str(e).__contains__('TypeError: arr.after is not a function')
33
34# reverse
35

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected