{"action":"created","issue":{"url":"https://api.github.com/repos/kentcdodds/dom-testing-library/issues/57","repository_url":"https://api.github.com/repos/kentcdodds/dom-testing-library","labels_url":"https://api.github.com/repos/kentcdodds/dom-testing-library/issues/57/labels{/name}","comments_url":"https://api.github.com/repos/kentcdodds/dom-testing-library/issues/57/comments","events_url":"https://api.github.com/repos/kentcdodds/dom-testing-library/issues/57/events","html_url":"https://github.com/kentcdodds/dom-testing-library/issues/57","id":332617210,"node_id":"MDU6SXNzdWUzMzI2MTcyMTA=","number":57,"title":"Merge wait and waitForElement","user":{"login":"hnordt","id":1625399,"node_id":"MDQ6VXNlcjE2MjUzOTk=","avatar_url":"https://avatars2.githubusercontent.com/u/1625399?v=4","gravatar_id":"","url":"https://api.github.com/users/hnordt","html_url":"https://github.com/hnordt","followers_url":"https://api.github.com/users/hnordt/followers","following_url":"https://api.github.com/users/hnordt/following{/other_user}","gists_url":"https://api.github.com/users/hnordt/gists{/gist_id}","starred_url":"https://api.github.com/users/hnordt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hnordt/subscriptions","organizations_url":"https://api.github.com/users/hnordt/orgs","repos_url":"https://api.github.com/users/hnordt/repos","events_url":"https://api.github.com/users/hnordt/events{/privacy}","received_events_url":"https://api.github.com/users/hnordt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-06-15T01:30:08Z","updated_at":"2018-06-15T01:32:49Z","closed_at":null,"author_association":"NONE","body":"To simplify the `wait()` API I think we could merge `wait()` and `waitForElement()`.\r\n\r\nThe implementation would be something like:\r\n\r\n```js\r\nconst isElement = obj => obj && obj.nodeType === Node.ELEMENT_NODE \r\n\r\nfunction wait(callback = () => {}) {\r\n  const result = callback()\r\n  return isElement(result) ? waitForElement(callback) : waitForExpect(callback)\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/kentcdodds/dom-testing-library/issues/comments/397487176","html_url":"https://github.com/kentcdodds/dom-testing-library/issues/57#issuecomment-397487176","issue_url":"https://api.github.com/repos/kentcdodds/dom-testing-library/issues/57","id":397487176,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NzQ4NzE3Ng==","user":{"login":"hnordt","id":1625399,"node_id":"MDQ6VXNlcjE2MjUzOTk=","avatar_url":"https://avatars2.githubusercontent.com/u/1625399?v=4","gravatar_id":"","url":"https://api.github.com/users/hnordt","html_url":"https://github.com/hnordt","followers_url":"https://api.github.com/users/hnordt/followers","following_url":"https://api.github.com/users/hnordt/following{/other_user}","gists_url":"https://api.github.com/users/hnordt/gists{/gist_id}","starred_url":"https://api.github.com/users/hnordt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hnordt/subscriptions","organizations_url":"https://api.github.com/users/hnordt/orgs","repos_url":"https://api.github.com/users/hnordt/repos","events_url":"https://api.github.com/users/hnordt/events{/privacy}","received_events_url":"https://api.github.com/users/hnordt/received_events","type":"User","site_admin":false},"created_at":"2018-06-15T01:32:49Z","updated_at":"2018-06-15T01:32:49Z","author_association":"NONE","body":"@kentcdodds sure, I can submit a PR, I'll just wait for thoughts from other people."}}
{"actor":{"display_login":"hnordt"}}