Last active
          August 29, 2015 14:25 
        
      - 
      
- 
        Save marr/dc3c8be6114f2680bedd to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | it.only('picks up state change after promise', function(done) { | |
| const input = TestUtils.renderIntoDocument(<input onChange={sinon.spy()} />); | |
| const p = new Promise(function(resolve, reject) { | |
| setTimeout(() => { | |
| TestUtils.Simulate.change(React.findDOMNode(input)); | |
| resolve(true); | |
| }, 10); | |
| }); | |
| p.then(function(result) { | |
| expect(result).to.be.true; | |
| expect(input.props.onChange).has.been.calledOnce; | |
| }).then(done, done); | |
| }); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment