Testing a MobX store in React #3556
Unanswered
AnthonyMadia
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
Relatively new to MobX and wondering what the best approach would be to testing a MobX store using Jest that is using other stores in a few of their methods.
For example, in this
EpochManager
class, theupdateWatch
method is calling theloadingPromise
method on theunirepConfig
class. To test this method properly, do I have to instantiate theUnirepConfig
class, too (and other stores that are used)?Would like to get more feedback on this. Thanks.
Here is the class in its entirety:
Beta Was this translation helpful? Give feedback.
All reactions