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

Store should fail synchronously when dispatching an action that triggers reducer to throw error #1865

Closed
alex-okrushko opened this issue May 16, 2019 · 0 comments · Fixed by #1871
Assignees

Comments

@alex-okrushko
Copy link
Member

That was the behavior that we had in v7

this.stateSubscription = stateAndAction$.subscribe({
next: ({ state, action }) => {
this.next(state);
scannedActions.next(action);
},
error: err => this.error(err),

We should also add the test like this:

it('should throw the error synchronously', () => {
      expect(() => {store.dispatch(ActionThatWouldThrowAnErrorInReducer));})
        .toThrowError('error in reducer'));
    });
brandonroberts pushed a commit that referenced this issue May 17, 2019
Closes #1865 

* revert(store): should fail synchronously

This commit partially reverts commit 60633b7

* test(store): should fail synchronously
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants