Created
July 20, 2015 00:42
-
-
Save AdamBrodzinski/c046ba1abfe88b670fae to your computer and use it in GitHub Desktop.
This file contains 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
TestUtils = React.addons.TestUtils; | |
Simulate = TestUtils.Simulate; | |
// returns rendered react component | |
renderComponent = function (comp, props) { | |
return TestUtils.renderIntoDocument( | |
React.createElement(comp, props) | |
); | |
}; | |
// more terse method of simulating events | |
simulateClickOn = function($el) { | |
React.addons.TestUtils.Simulate.click($el[0]); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment