title: how to change jest mock function return value in each test?
body: <p>I have a mock module like this in my component test file</p>
  
  <pre><code>  jest.mock('../../../magic/index', () =&gt; ({
      navigationEnabled: () =&gt; true,
      guidanceEnabled: () =&gt; true
    }));
  </code></pre>
  
  <p>these functions will be called in render function of my component to hide and show some specific feature.</p>
  
  <p>I want to take a snapshot on different combinations of the return value of those mock functions.</p>
  
  <p>for suppose I have a test case like this</p>
  
  <pre><code> it('RowListItem should not render navigation and guidance options', () =&gt; {
      const wrapper = shallow(
        &lt;RowListItem type="regularList" {...props} /&gt;
      );
      expect(enzymeToJson(wrapper)).toMatchSnapshot();
    });
  </code></pre>
  
  <p>to run this test case I want to change the mock module functions return values to <code>false</code> like this dynamically</p>
  
  <pre><code>jest.mock('../../../magic/index', () =&gt; ({
      navigationEnabled: () =&gt; false,
      guidanceEnabled: () =&gt; false
    }));
  </code></pre>
  
  <p>because i am importing <code>RowListItem</code> component already once so my mock module wont re import again. so it wont change. how can i solve this ?</p>