title: sinon spy.calledOnce inside a promise returns false
body: <p>I am trying to test that a function inside a stubbed promise was called. Unfortunately the spy on that function seems to be called only after the tests. Here is a simplified version of my React code.</p>
  
  <pre><code>export default class TheComponent extends React.Component {
    constructor(props) {
      super(props);
    }
  
    onSend(data) {
      AUtility.aPromise(data).then(() =&gt; {
        this.props.onSend(data);
        console.log("Props onSend was called!")
      });
    }
  
    render() {
      return null;
    }
  }
  </code></pre>
  
  <p>and here is the test I try to run.</p>
  
  <pre><code>it('should call the props function', (done) =&gt; {
      const onSendSpy = spy();
      const promiseStub = stub(AUtility, 'aPromise').resolves('mock string');
      wrapper = shallow(&lt;TheComponent onSend={onSendSpy} /&gt;
      wrapper.instance().onSend();
      expect(promiseStub.calledOnce).to.be.true;  //this passes
      expect(onSendSpy.calledOnce) //this fails
      done();
  });
  </code></pre>
  
  <p>Whenever I run the test the first assertion passes but not the second. However the print statement in my code still prints the string during the test. It seems that the done() function will make the test finish once the promise returns and not once the then block is fully executed. How can I get this test to pass?</p>