Skip to content

Commit

Permalink
test(canReport): use noop error handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
cartant committed Sep 7, 2018
1 parent daa02c4 commit ed2a617
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/util/canReportError-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import { canReportError } from 'rxjs/internal/util/canReportError';

describe('canReportError', () => {
it('should report errors to an observer if possible', () => {
const subscriber = new Subscriber(noop);
const subscriber = new Subscriber(noop, noop);
expect(canReportError(subscriber)).to.be.true;
});

it('should not report errors to a stopped observer', () => {
const subscriber = new Subscriber(noop);
const subscriber = new Subscriber(noop, noop);
subscriber.error(new Error('kaboom'));
expect(canReportError(subscriber)).to.be.false;
});
Expand All @@ -20,7 +20,7 @@ describe('canReportError', () => {
});

it('should not report errors an observer with a stopped destination', () => {
const destination = new Subscriber(noop);
const destination = new Subscriber(noop, noop);
const subscriber = new Subscriber(destination);
destination.error(new Error('kaboom'));
expect(canReportError(subscriber)).to.be.false;
Expand Down

0 comments on commit ed2a617

Please sign in to comment.