()
| 1706 | |
| 1707 | |
| 1708 | def test_some_self_jsfunction(): |
| 1709 | items = ['Four', 'Three', 'One'] |
| 1710 | |
| 1711 | result = pm.eval(""" |
| 1712 | (arr) => { |
| 1713 | function increment(element, index, array) { |
| 1714 | this.count++; |
| 1715 | return false; |
| 1716 | } |
| 1717 | let jsObj = {count: 0} |
| 1718 | arr.some(increment, jsObj); |
| 1719 | return jsObj.count; |
| 1720 | } |
| 1721 | """)(items) |
| 1722 | assert result == 3 |
| 1723 | |
| 1724 | # every |
| 1725 |
nothing calls this directly
no outgoing calls
no test coverage detected