title: Sinon spy callCount property returns 0 on some tests
body: <p>This is my code:</p>
  
  <pre class="lang-js prettyprint-override"><code>// SUT.spec.js
  import * as myModule from './myModule';
  
  describe('my issue', () =&gt; {
    let myFuncSpy = sinon.spy(myModule, 'myFunc');
  
    beforeEach(() =&gt; {
      myFuncSpy.reset();
    });
  
    it('my case A', () =&gt; {
      SUT.methodA();
  
      expect(myFuncSpy.callCount).to.equal(1);  // fails, it says it's 0
    });
  
    it('my case B', () =&gt; {
      SUT.methodB();
  
      expect(myFuncSpy.callCount).to.equal(1);  // passes
  
    });
  });
  </code></pre>
  
  <p>In my module, both method calls <code>myFunc</code>, however only on <code>methodA</code> it's not being registered:</p>
  
  <pre class="lang-js prettyprint-override"><code>// SUT.js
  import { myFunc } from './myModule';
  
  export function methodA() {
    myFunc(....);
    console.log(myFunc.callCount); // Mocha output shows 1
  };
  
  export function methodB() {
    myFunc(....);
    console.log('method B ran');   // Mocha output shows this line
    console.log(myFunc.callCount); // Mocha output shows 1
  };
  </code></pre>
  
  <p>Basically there is no apparent difference in the way the spy is being called. I'm very confused as what could be possible wrong.</p>
  
  <p>I added the <code>console.log</code> statement inside the SUT just to make sure the spy was properly set (otherwise it wouldn't have a property called <code>callCount</code>).  Also, if I comment out the <code>.reset()</code> call, the log statement shows <code>undefined</code> instead of <code>1</code> or another number.</p>
  
  <p>What could be wrong in here?  This is of course a simplified version of the actual SUT. However, the <code>console.log</code> statements show that the problem is definitely not that the lines are not being executed.</p>