-
-
Notifications
You must be signed in to change notification settings - Fork 87
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
StoreModule and MockBuilder issues #589
Comments
Hi @Dji75, let's discuss the issue here. Could it be an option for you to have a call with screensharing? |
Thanks, I just sent you an email |
Hi @Dji75, today at 16 CET then :) I tried to answer on your email but got a rejection email from outlook. So the same link you provided at 16 CET. |
@Dji75, sure, let's do it at 16.15 then. |
For the records. 2 issues:
|
In the meantime, I've added the following lines in ngMocks.globalExclude(StoreDevtoolsModule);
ngMocks.globalExclude(BrowserAnimationsModule); |
Hi @Dji75, could you test if this update works for you? ng-mocks.zip. The main change is that About |
fix(core): excluding StoreDevtoolsModule by default #589
Hi @satanTime, Thanks for this release :) I ran my test under Firefox (headless) and Chrome (headless) with same result (still an error even if slightly différent if I don't use this version):
The real util function given to metaReducers is still called (even with the spy) We can have a call together if you want, same GMeet at 16PM (CET) if you are available 😉 |
Hi @Dji75, thanks for the info. Yes, let's do that today at 16 CET. |
Add to the documentation information about |
About aminations - the problem is that Animation module provides a mock version of |
v12.1.0 has been released and contains a fix for the issue. Feel free to reopen the issue or to submit a new one if you meet any problems. |
It works like a charm 👍 |
Cool! Thanks for the report! |
I finally found why my tests runs not using initial (empty) initial state, this was because the spy on my metaReducer util was not taken into account, so I got previous value from sessionStorage which failed some tests :(
Here is the declaration in
AppModule
:Here is how I set spy (using jasmine), prior to
MockBuilder
usage:Maybe it can help you to see util's declaration ;)
If I add some logs in this util, I can see them in console 👎
If I remove metaReducers declaration, it works.
Moreover, I see another problem using
StoreDevtoolsModule
. I also have to keep it (.keep(StoreDevtoolsModule)
). Most of tests fails because reducer function is not called even afterstore.dispatch
.you asked me before how I spy on store, here it is:
Originally posted by @Dji75 in #312 (comment)
The text was updated successfully, but these errors were encountered: