Skip to content

Commit

Permalink
fix: Ensure the Observable failure test works (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
phated committed Jun 25, 2022
1 parent b6612f5 commit dfa4f0b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/observables.js
Expand Up @@ -16,7 +16,9 @@ function successValue() {
}

function failure() {
return rxjs.throw(new Error('Observable error'));
return rxjs.throwError(function () {
return new Error('Observable error');
});
}

describe('observables', function () {
Expand All @@ -37,6 +39,7 @@ describe('observables', function () {
it('should handle an errored observable', function (done) {
asyncDone(failure, function (err) {
expect(err).toBeInstanceOf(Error);
expect(err.message).toEqual('Observable error');
done();
});
});
Expand Down

0 comments on commit dfa4f0b

Please sign in to comment.