{"action":"created","issue":{"url":"https://api.github.com/repos/airbnb/enzyme/issues/147","labels_url":"https://api.github.com/repos/airbnb/enzyme/issues/147/labels{/name}","comments_url":"https://api.github.com/repos/airbnb/enzyme/issues/147/comments","events_url":"https://api.github.com/repos/airbnb/enzyme/issues/147/events","html_url":"https://github.com/airbnb/enzyme/issues/147","id":129632578,"number":147,"title":"simulate() support for custom events on shallow rendered children","user":{"login":"alex-e-leon","id":7065873,"avatar_url":"https://avatars.githubusercontent.com/u/7065873?v=3","gravatar_id":"","url":"https://api.github.com/users/alex-e-leon","html_url":"https://github.com/alex-e-leon","followers_url":"https://api.github.com/users/alex-e-leon/followers","following_url":"https://api.github.com/users/alex-e-leon/following{/other_user}","gists_url":"https://api.github.com/users/alex-e-leon/gists{/gist_id}","starred_url":"https://api.github.com/users/alex-e-leon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alex-e-leon/subscriptions","organizations_url":"https://api.github.com/users/alex-e-leon/orgs","repos_url":"https://api.github.com/users/alex-e-leon/repos","events_url":"https://api.github.com/users/alex-e-leon/events{/privacy}","received_events_url":"https://api.github.com/users/alex-e-leon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-29T01:07:40Z","updated_at":"2016-01-29T07:22:41Z","closed_at":null,"body":"Any thoughts on having simulate run arbitrary custom events on a shallowly rendered child? Ie ideally I'd like to be able to call simulate on any of a shallow rendered childs props that call a function.\r\n\r\nex calling `simulate('customEvent')` on `<child customEvent={func}/> would run `func()` on a shallow rendered component.\r\n\r\nThis would allow us to assert functions that might not run on standard dom events without having to write a full integration test.\r\n\r\nWe could create a new function shallowSimulate() or something if we're worried about the interactions on fully `mount()`ed components."},"comment":{"url":"https://api.github.com/repos/airbnb/enzyme/issues/comments/176616833","html_url":"https://github.com/airbnb/enzyme/issues/147#issuecomment-176616833","issue_url":"https://api.github.com/repos/airbnb/enzyme/issues/147","id":176616833,"user":{"login":"lelandrichardson","id":1885623,"avatar_url":"https://avatars.githubusercontent.com/u/1885623?v=3","gravatar_id":"","url":"https://api.github.com/users/lelandrichardson","html_url":"https://github.com/lelandrichardson","followers_url":"https://api.github.com/users/lelandrichardson/followers","following_url":"https://api.github.com/users/lelandrichardson/following{/other_user}","gists_url":"https://api.github.com/users/lelandrichardson/gists{/gist_id}","starred_url":"https://api.github.com/users/lelandrichardson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lelandrichardson/subscriptions","organizations_url":"https://api.github.com/users/lelandrichardson/orgs","repos_url":"https://api.github.com/users/lelandrichardson/repos","events_url":"https://api.github.com/users/lelandrichardson/events{/privacy}","received_events_url":"https://api.github.com/users/lelandrichardson/received_events","type":"User","site_admin":false},"created_at":"2016-01-29T07:22:41Z","updated_at":"2016-01-29T07:22:41Z","body":"@alex-e-leon I like this idea in spirit, but i'll have to think for a bit about whether or not it is a good idea or not.\r\n\r\nIn the interim, running `wrapper.find(Child).prop('customEvent')(fakeEvent)` will do essentially what you're asking for already..."}}