Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(Subscriber): add test for no error propagation #1181

Closed
wants to merge 1 commit into from

Conversation

staltz
Copy link
Member

@staltz staltz commented Jan 13, 2016

Add test to assert that error happening in the next() handler should not propagate to the error()
handler.

For issue #1135.

@luisgabriel
Copy link
Contributor

LGTM.

@kwonoj
Copy link
Member

kwonoj commented Jan 21, 2016

Can we convert test case to synchronous? I've tried way like below snippet.

var subscriber = Subscriber.create(
  function next(value) {
    if (value === 2) {
      throw 'error!';
    }
  },
  errorSpy,
  completeSpy
);

subscriber.next(1);

expect(function () {
  subscriber.next(2);
}).toThrow('error!');

expect(errorSpy).not.toHaveBeenCalled();
expect(completeSpy).not.toHaveBeenCalled();

Add test to assert that error happening in the next() handler should not propagate to the error()
handler.

For issue ReactiveX#1135.
@staltz
Copy link
Member Author

staltz commented Jan 25, 2016

@kwonoj Done

@kwonoj
Copy link
Member

kwonoj commented Jan 25, 2016

👍 looks good to me.

@kwonoj
Copy link
Member

kwonoj commented Jan 25, 2016

Merged with d6f9668, thanks @staltz

@kwonoj kwonoj closed this Jan 25, 2016
@lock
Copy link

lock bot commented Jun 7, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants