{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react/issues/5284","labels_url":"https://api.github.com/repos/facebook/react/issues/5284/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react/issues/5284/comments","events_url":"https://api.github.com/repos/facebook/react/issues/5284/events","html_url":"https://github.com/facebook/react/issues/5284","id":113302536,"number":5284,"title":"TestUtils: Simulate.click incompatible with Shallow Rendering?","user":{"login":"StevenLangbroek","id":296796,"avatar_url":"https://avatars.githubusercontent.com/u/296796?v=3","gravatar_id":"","url":"https://api.github.com/users/StevenLangbroek","html_url":"https://github.com/StevenLangbroek","followers_url":"https://api.github.com/users/StevenLangbroek/followers","following_url":"https://api.github.com/users/StevenLangbroek/following{/other_user}","gists_url":"https://api.github.com/users/StevenLangbroek/gists{/gist_id}","starred_url":"https://api.github.com/users/StevenLangbroek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StevenLangbroek/subscriptions","organizations_url":"https://api.github.com/users/StevenLangbroek/orgs","repos_url":"https://api.github.com/users/StevenLangbroek/repos","events_url":"https://api.github.com/users/StevenLangbroek/events{/privacy}","received_events_url":"https://api.github.com/users/StevenLangbroek/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-26T07:58:57Z","updated_at":"2015-10-27T00:49:16Z","closed_at":null,"body":"I'm doing a simple shallow render on a component which has a button (`<a>`) with an `onClick` handler. I can correctly assert most of its properties, but I can't get asserting whether the button has been clicked (by using `TestUtils.Simulate.click(output.props.children[1])` and a `sinon.spy()` passed in as handler) to work. TestUtils doesn't throw any Invariant Violation or whatever other error, the spy just never gets called. When I manually call it through `this.props.children[1].props.onClick()` it works. Is this expected behavior?"},"comment":{"url":"https://api.github.com/repos/facebook/react/issues/comments/151327657","html_url":"https://github.com/facebook/react/issues/5284#issuecomment-151327657","issue_url":"https://api.github.com/repos/facebook/react/issues/5284","id":151327657,"user":{"login":"spicyj","id":6820,"avatar_url":"https://avatars.githubusercontent.com/u/6820?v=3","gravatar_id":"","url":"https://api.github.com/users/spicyj","html_url":"https://github.com/spicyj","followers_url":"https://api.github.com/users/spicyj/followers","following_url":"https://api.github.com/users/spicyj/following{/other_user}","gists_url":"https://api.github.com/users/spicyj/gists{/gist_id}","starred_url":"https://api.github.com/users/spicyj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spicyj/subscriptions","organizations_url":"https://api.github.com/users/spicyj/orgs","repos_url":"https://api.github.com/users/spicyj/repos","events_url":"https://api.github.com/users/spicyj/events{/privacy}","received_events_url":"https://api.github.com/users/spicyj/received_events","type":"User","site_admin":false},"created_at":"2015-10-27T00:49:16Z","updated_at":"2015-10-27T00:49:16Z","body":"That's expected. We should probably give a better error message – changing this issue title to reflect that."}}