(eventName: string, expectedPassiveLog: string, options: any)
| 1714 | logs.push(e.defaultPrevented ? 'defaultPrevented' : 'default will run'); |
| 1715 | }; |
| 1716 | const testPassive = function (eventName: string, expectedPassiveLog: string, options: any) { |
| 1717 | (button as any).addEventListener(eventName, listener, options); |
| 1718 | const evt = document.createEvent('Event'); |
| 1719 | evt.initEvent(eventName, false, true); |
| 1720 | button.dispatchEvent(evt); |
| 1721 | expect(logs).toEqual(['default will run', expectedPassiveLog]); |
| 1722 | (button as any).removeAllListeners(eventName); |
| 1723 | }; |
| 1724 | beforeEach(() => { |
| 1725 | logs = []; |
| 1726 | (button as any).removeAllListeners(); |
no test coverage detected
searching dependent graphs…