I want to reset all domain stores before each test case. Is there some way to do it with Effector?
Effector: how to reset all domain stores before each test?
639 views Asked by Oleg Kusov At
1
I want to reset all domain stores before each test case. Is there some way to do it with Effector?
There is no such API in effector. You can create separate event and subscribe every store to it:
But in general you shouldn't manually reset stores in tests. Prefer Fork API usage instead
https://effector.dev/docs/api/effector/fork - docs
https://dev.to/effector/the-best-part-of-effector-4c27 - article
Example: