()
| 1608 | |
| 1609 | |
| 1610 | def test_some_check_this_arg(): |
| 1611 | items = ['Four', 'Three', 'One'] |
| 1612 | result = [None] |
| 1613 | pm.eval( |
| 1614 | """ |
| 1615 | (result, arr) => { |
| 1616 | class Counter { |
| 1617 | constructor() |
| 1618 | { |
| 1619 | this.count = 0; |
| 1620 | } |
| 1621 | add(array) { |
| 1622 | array.some(function countEntry(entry) { ++this.count; }, this); |
| 1623 | } |
| 1624 | } |
| 1625 | const obj = new Counter(); |
| 1626 | obj.add(arr); |
| 1627 | result[0] = obj.count; |
| 1628 | } |
| 1629 | """ |
| 1630 | )(result, items) |
| 1631 | assert result == [3] |
| 1632 | |
| 1633 | |
| 1634 | def test_some_truthy_conversion(): |
nothing calls this directly
no outgoing calls
no test coverage detected