Skip to content

Commit dfa4f0b

Browse files
authored
fix: Ensure the Observable failure test works (#59)
1 parent b6612f5 commit dfa4f0b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: test/observables.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ function successValue() {
1616
}
1717

1818
function failure() {
19-
return rxjs.throw(new Error('Observable error'));
19+
return rxjs.throwError(function () {
20+
return new Error('Observable error');
21+
});
2022
}
2123

2224
describe('observables', function () {
@@ -37,6 +39,7 @@ describe('observables', function () {
3739
it('should handle an errored observable', function (done) {
3840
asyncDone(failure, function (err) {
3941
expect(err).toBeInstanceOf(Error);
42+
expect(err.message).toEqual('Observable error');
4043
done();
4144
});
4245
});

0 commit comments

Comments
 (0)