title: Is there any way to mock private functions with Jest?
body: <p>The ES6 module that I want to test looks as follows:</p>
  <pre><code>function privateFunction() {
     ...
  }
  export function publicFunction() {
     ... does something ...
     privateFunction()
     ... does something else ...
  }
  </code></pre>
  <p>I am using JEST for my unit tests and I am trying to find a way to test <code>publicFunction</code> and avoiding the execution of <code>privateFunction</code> by mocking it but I couldn't succeed in the mock attempt. Any idea?</p>