title: How do you mock isPlatform from @ionic/core
body: <p>Have a React Ionic app where I need to determine if the app is running on an iOS device.  I've done that by importing isPlatform.</p>
  <pre><code>import { isPlatform } from &quot;@ionic/core&quot;;
  
  const isIOS = isPlatform(&quot;ios&quot;);
  </code></pre>
  <p>I've tried the following and when isPlatform is called it still returns false.</p>
  <pre><code>        jest.mock(&quot;@ionic/core&quot;, () =&gt; ({
              isPlatform: () =&gt; { 
                  return true;
              }
          }));
  </code></pre>
  <p>How do I mock isPlatform in my unit test using jest so it returns true?</p>
  <p>Figured it out. I needed to mock ionic/core in order for it to work.</p>
  <pre><code>jest.mock(&quot;@ionic/core&quot;);
  import * as Ionic from '@ionic/core';
  
  (Ionic as any).isPlatform = jest.fn(() =&gt; true);
  </code></pre>