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

Function test_reduce_string

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

Source from the content-addressed store, hash-verified

1425
1426
1427def test_reduce_string():
1428 items = ['Hi', 'There']
1429 result = [None]
1430 pm.eval("""
1431 (result, arr) => {
1432 result[0] = arr.reduce((accumulator, currentValue) => accumulator + currentValue, "");
1433 }
1434 """)(result, items)
1435 assert result[0] == 'HiThere'
1436
1437
1438def test_reduce_initial_value_not_zero():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected