Skip to content

Instantly share code, notes, and snippets.

@joepie91
Forked from marr/-
Last active August 29, 2015 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joepie91/be4ee695ae32cafdd9a7 to your computer and use it in GitHub Desktop.
Save joepie91/be4ee695ae32cafdd9a7 to your computer and use it in GitHub Desktop.
const input = TestUtils.renderIntoDocument(<input onChange={sinon.spy()} />);
Promise.resolve().then(function(){
TestUtils.Simulate.change(React.findDOMNode(input));
return true;
}).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