How to test whether a progress bar appears and disappears on response using react-native and jest testing framework?
<p>Basically, I want to call onLoginPressed event from login-test file and check whether showProcessbar is set to true or not and on response it is set to false.</p>

<pre><code>var Login = require('../Login');//

describe('Check Login', () =&gt; {
  Login.onLoginPressed();
  it('process bar is shown', () =&gt; {
    expect(showProgress).toBe(true);
  });

  it('process bar is gone', () =&gt; {
    expect(showProgress).toBe(false);
  });
});
</code></pre>