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