title: Call a function of another exported method
body: <p>I have a file called <code>internal.js</code>, and it looks like this:</p>
  
  <pre><code>module.exports = deps =&gt; async (event) =&gt; {
      console.log(deps.a);
      console.log(aFunction());
  
      function aFunction() {
          return "This is the aFunction - " + deps.a;
      }
  }
  </code></pre>
  
  <p>and another file <code>external.js</code> that <code>require</code> it, and it looks like this:</p>
  
  <pre><code>let internal = require('./internal')({
    a: "this is the a variable"
  });
  
  internal();
  </code></pre>
  
  <p>I execute this launching <code>node external.js</code> and the result is:</p>
  
  <pre><code>➜ node external.js
  this is the a variable
  This is the aFunction - this is the a variable
  </code></pre>
  
  <p>OK for now. What I would, due to testing reasons, is the ability to invoke directly <code>aFunction</code> that is coded inside the <code>internal.js</code> (note due to the <code>deps.a</code> I cannot move <code>aFunction</code> outside the <code>module.exports</code>). How can I do?</p>