()
| 1835 | |
| 1836 | |
| 1837 | def test_every_self_jsfunction(): |
| 1838 | items = ['Four', 'Three', 'One'] |
| 1839 | |
| 1840 | result = pm.eval(""" |
| 1841 | (arr) => { |
| 1842 | function increment(element, index, array) { |
| 1843 | this.count++ |
| 1844 | return true; |
| 1845 | } |
| 1846 | let jsObj = {count: 0} |
| 1847 | arr.every(increment, jsObj); |
| 1848 | return jsObj.count; |
| 1849 | } |
| 1850 | """)(items) |
| 1851 | assert result == 3 |
| 1852 | |
| 1853 | # find |
| 1854 |
nothing calls this directly
no outgoing calls
no test coverage detected