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(store): added noop for all methods in MockReducerManager #2777

Merged

Conversation

nagyadam2092
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

It is currently not possible to use provideMockStore if the component has a dependency to a module which uses the following imports:

  • removeFeature
  • removeFeatures
  • addReducer
  • addReducers
  • removeReducer
  • removeReducers

Currently crashes with something like
TypeError: reducerManager.addReducer is not a function

Closes #2776

What is the new behavior?

Add noop for removeFeature, removeFeatures, addReducer, addReducers, removeReducer, removeReducers.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

@ngrxbot
Copy link
Collaborator

ngrxbot commented Nov 9, 2020

Preview docs changes for 3b50740 at https://previews.ngrx.io/pr2777-3b50740d/

@timdeschryver
Copy link
Member

Closes #2776

@timdeschryver timdeschryver reopened this Nov 10, 2020
@timdeschryver timdeschryver merged commit a489b48 into ngrx:master Nov 10, 2020
@timdeschryver
Copy link
Member

Thanks @nagyadam2092

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MockReducerManager.addReducers is not a function when testing
4 participants