()
| 1756 | |
| 1757 | |
| 1758 | def test_every_check_this_arg(): |
| 1759 | items = ['Four', 'Three', 'One'] |
| 1760 | result = [None] |
| 1761 | pm.eval( |
| 1762 | """ |
| 1763 | (result, arr) => { |
| 1764 | class Counter { |
| 1765 | constructor() |
| 1766 | { |
| 1767 | this.count = 0; |
| 1768 | } |
| 1769 | add(array) { |
| 1770 | array.every(function countEntry(entry) { ++this.count; }, this); |
| 1771 | } |
| 1772 | } |
| 1773 | const obj = new Counter(); |
| 1774 | obj.add(arr); |
| 1775 | result[0] = obj.count; |
| 1776 | } |
| 1777 | """ |
| 1778 | )(result, items) |
| 1779 | assert result == [1] |
| 1780 | |
| 1781 | |
| 1782 | def test_every_with_python_function(): |
nothing calls this directly
no outgoing calls
no test coverage detected