diff --git a/spec/observables/fromEvent-spec.ts b/spec/observables/fromEvent-spec.ts index 893f66f6cd..f2d57d0010 100644 --- a/spec/observables/fromEvent-spec.ts +++ b/spec/observables/fromEvent-spec.ts @@ -132,16 +132,17 @@ describe('fromEvent', () => { }); }); - it('should pass through options to addEventListener', () => { - let actualOptions; + it('should pass through options to addEventListener and removeEventListener', () => { + let onOptions; + let offOptions; const expectedOptions = { capture: true, passive: true }; const obj = { addEventListener: (a: string, b: EventListenerOrEventListenerObject, c?: any) => { - actualOptions = c; + onOptions = c; }, removeEventListener: (a: string, b: EventListenerOrEventListenerObject, c?: any) => { - //noop + offOptions = c; } }; @@ -152,7 +153,8 @@ describe('fromEvent', () => { subscription.unsubscribe(); - expect(actualOptions).to.equal(expectedOptions); + expect(onOptions).to.equal(expectedOptions); + expect(offOptions).to.equal(expectedOptions); }); it('should pass through events that occur', (done: MochaDone) => {