title: Node js stubbing issue
body: <p>So, I am trying to write unit tests for a lambda handler. It is just a classic <code>exports.handler</code>
  function expression.I require this using <code>const {handler}=require( &quot;.&quot;)</code>. Just after requiring it, there's a const which makes an api call to a third party service to obtain few details for further processing.</p>
  <p>At my unit testing side, I am running into Assertion error of not passing the required key for that third party service.</p>
  <pre><code>const analytics = new Analytics(process.env.yourWritekey, analyticsOptions);
  
  exports.handler=async(event,context,callback)=&gt;{
  
    //this part is business logic
  }
  </code></pre>
  <p>So my question is , how did I just test the handler by stubbing the third party api call?</p>