How to test a component with the local stor MobX?

There is a component class in its constructor initializes a local store MobX like this:
constructor(props) {
super(props); = new SubscribeStore({
 userId: this.props.userId
 type: this.props.isFollowers ? 'followers' : 'subscriptions'

In the end, the stor lies in this writing test can't find a way to control it.
There is an option to put the store in a global space and to pass through the Provider, but I would not want to pollute global space. Who faced with such?
For the tests using Jest and Enzyme
April 3rd 20 at 18:39
2 answers
April 3rd 20 at 18:41
Here's another concept under test. Test the functionality of a component instead of a string and features component. Moreover, it is a mistake to make private functions in the global space.

Write your tests so that they do not Fallis, if you then rewrite your app, removing and rewriting mobh components on the hooks, but leaving the old functionality of the component.

Even unit tests write to the user. User still, you used a component with MOPH or hooks and context.
April 3rd 20 at 18:43
Yet made such a decision, can someone come in handy. But I think it's a crutch.
1) Import your test class
2) extend from this new class
3) In the constructor assign in another object with Mogami
4) in componentDidMount call super.render()

The whole thing render shallow of the enzyme, and ShallowRenderer of Jest

Find more questions by tags Testing softwareReactMobX