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

fix(Subject): throw ObjectUnsubscribedError when unsubecribed … #1316

Closed
wants to merge 4 commits into from

Conversation

kwonoj
Copy link
Member

@kwonoj kwonoj commented Feb 8, 2016

This PR tries to close #859, now Subject throws ObjectUnsubscribedError if it's unsubscribed. Updated operator behavior and test cases also to not emit after subject completion(error, complete, unsub)

@@ -221,9 +215,6 @@ describe('Subject', function () {
subscription1.unsubscribe();

subject.complete();
subject.next(9);
subject.complete();
subject.error(new Error('err'));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we adding tests for expectations of throwing in these deleted scenarios?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, thanks for catching it. Subject's spec's are not updated to include those. Updating it now.

@kwonoj
Copy link
Member Author

kwonoj commented Feb 8, 2016

PR's updated to add test coverage for changed behavior.

@benlesh
Copy link
Member

benlesh commented Feb 9, 2016

LGTM... merged as of 64bf6b1. Thanks @kwonoj

@benlesh benlesh closed this Feb 9, 2016
@kwonoj kwonoj deleted the subject-unsuberror branch February 9, 2016 22:30
@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.

Unsubscribed Subjects should throw ObjectDisposedError if next, error or complete is called.
2 participants