Skip to content

Commit

Permalink
test(Observable): add failing test for syncErrorThrowable issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jayphelps committed Dec 5, 2017
1 parent 520b06a commit c498974
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions spec/Observable-spec.ts
Expand Up @@ -59,6 +59,20 @@ describe('Observable', () => {
}).to.throw();
});

it('should rethrow if sink has syncErrorThrowable = false', () => {
const observable = new Observable(observer => {
observer.next(1);
});

const sink = Subscriber.create(() => {
throw 'error!';
});

expect(() => {
observable.subscribe(sink);
}).to.throw('error!');
});

describe('forEach', () => {
it('should iterate and return a Promise', (done: MochaDone) => {
const expected = [1, 2, 3];
Expand Down

0 comments on commit c498974

Please sign in to comment.