Skip to content

Commit

Permalink
test(forkJoin): add selector error test
Browse files Browse the repository at this point in the history
  • Loading branch information
cartant committed Jan 26, 2018
1 parent 6a4ace4 commit ea10cd4
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions spec/observables/forkJoin-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,20 @@ describe('Observable.forkJoin', () => {
expectObservable(e1).toBe(expected);
});

it('should raise error when the selector throws', () => {
function selector(x, y) {
throw 'error';
}

const e1 = Observable.forkJoin(
hot('--a-|'),
hot('---b-|'),
selector);
const expected = '-----#';

expectObservable(e1).toBe(expected);
});

it('should allow unsubscribing early and explicitly', () => {
const e1 = hot('--a--^--b--c---d-| ');
const e1subs = '^ ! ';
Expand Down

0 comments on commit ea10cd4

Please sign in to comment.