You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As per the guideline states, I already asked my general support question on SO: https://stackoverflow.com/questions/64715061/addreducer-missing-on-mockstore
but didn't get any answers yet, so I opened an Issue instead, sorry if this is still not following the guidelines.
Basically my question is that what is the proposed setup if my code uses ReducerManager.addReducers in a test environment. Our setup relies on dynamically adding reducers to the store, but this ReducerManager.addReducers call breaks tests with this error: this.reducerManager.addReducers is not a function.
What is the suggested way of testing modules that are calling ReducerManager.addReducers? Maybe adding this as noop calls would solve the issue? (like this PR: https://github.com/ngrx/platform/pull/2265/files)
The text was updated successfully, but these errors were encountered:
Hi @nagyadam2092
Thank you for going with the guideline recommendation at first. Btw, we also have a Discord Server now (discord.gg/ngrx) - it's one of the fastest way to bring it to the community's attention.
You are right - adding these methods and making them a noop should solve your immediate issue.
In the meantime you might to extend MockReducerManager in your code and provide it in your tests instead.
Thanks for the reply @alex-okrushko ! Didn't know about the Discord community, going to check it!
Opened #2777 for the quick fix of the described behaviour.
As per the guideline states, I already asked my general support question on SO: https://stackoverflow.com/questions/64715061/addreducer-missing-on-mockstore
but didn't get any answers yet, so I opened an Issue instead, sorry if this is still not following the guidelines.
Basically my question is that what is the proposed setup if my code uses
ReducerManager.addReducers
in a test environment. Our setup relies on dynamically adding reducers to the store, but thisReducerManager.addReducers
call breaks tests with this error:this.reducerManager.addReducers is not a function
.What is the suggested way of testing modules that are calling
ReducerManager.addReducers
? Maybe adding this asnoop
calls would solve the issue? (like this PR: https://github.com/ngrx/platform/pull/2265/files)The text was updated successfully, but these errors were encountered: