UNPKG

rxjs-marbles

Version:

An RxJS marble testing library for any test framework

20 lines (19 loc) 452 B
import { noop, Subscriber } from "rxjs"; export class DoneSubscriber extends Subscriber { constructor(onError, onComplete) { super({ complete: onComplete, error: onError, next: noop, }); this.onError = onError; } unsubscribe() { try { super.unsubscribe(); } catch (error) { this.onError(error); } } }