Created
July 19, 2017 09:25
-
-
Save cimfalab/367e6469830542faf0eac9244339adfe to your computer and use it in GitHub Desktop.
__tests__/EventPluginHub-test.js
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
it('should prevent non-function listeners, at dispatch', () => { | |
var node = ReactTestUtils.renderIntoDocument( | |
<div onClick="not a function" />, | |
); | |
expect(function() { | |
ReactTestUtils.SimulateNative.click(node); | |
}).toThrowError( | |
'Expected onClick listener to be a function, instead got type string', | |
); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment