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

Function test_iterator_iterator

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

Source from the content-addressed store, hash-verified

2538
2539
2540def test_iterator_iterator():
2541 items = [1, 2, 3, 4]
2542 result = [0]
2543 pm.eval("(result, arr) => {let iter = arr[Symbol.iterator](); let head = iter.next().value; result[0] = [...iter] }")(
2544 result, items)
2545 assert result[0] == [2, 3, 4]
2546
2547# Array.from
2548

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected