(args1?: any, args2?: any)
| 1261 | }); |
| 1262 | |
| 1263 | const testAddRemove = function (args1?: any, args2?: any) { |
| 1264 | zone.run(function () { |
| 1265 | if (args1) { |
| 1266 | (document as any).addEventListener('click', docListener, args1); |
| 1267 | } else { |
| 1268 | (document as any).addEventListener('click', docListener); |
| 1269 | } |
| 1270 | if (args2) { |
| 1271 | (document as any).removeEventListener('click', docListener, args2); |
| 1272 | } else { |
| 1273 | (document as any).removeEventListener('click', docListener); |
| 1274 | } |
| 1275 | }); |
| 1276 | |
| 1277 | button.dispatchEvent(clickEvent); |
| 1278 | expect(cancelSpy).toHaveBeenCalled(); |
| 1279 | expect(logs).toEqual([]); |
| 1280 | }; |
| 1281 | |
| 1282 | it('should be able to add/remove same handler with mix options and capture', function () { |
| 1283 | let captureFalse = [ |
no test coverage detected
searching dependent graphs…