title: Sinon - returns is not a function
body: <p>I'm writing unit tests and I have a module file like so:</p>
  
  <pre><code>#!/usr/bin/env node
  const shelljs = require('shelljs');
  
  const bulkUpdateDependencies = (outdatedPackages) =&gt; {
      // some logic
      return ({});
  };
  
  module.exports = bulkUpdateDependencies;
  </code></pre>
  
  <p>In the test file I require it but when I try to do this:</p>
  
  <pre><code>const bulkUpdateDependencies = require('../src/bulk-update-dependencies');
  
  bulkUpdateDependenciesStub = sandbox.stub(bulkUpdateDependencies);
  bulkUpdateDependenciesStub.returns({});
  </code></pre>
  
  <p>I get this: </p>
  
  <blockquote>
    <p>bulkUpdateDependencies.returns is not a function</p>
  </blockquote>
  
  <p>Please advise on how do I properly stub <code>bulkUpdateDependencies</code> function?</p>