{"action":"opened","issue":{"url":"https://api.github.com/repos/rtsao/browser-unhandled-rejection/issues/9","repository_url":"https://api.github.com/repos/rtsao/browser-unhandled-rejection","labels_url":"https://api.github.com/repos/rtsao/browser-unhandled-rejection/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/rtsao/browser-unhandled-rejection/issues/9/comments","events_url":"https://api.github.com/repos/rtsao/browser-unhandled-rejection/issues/9/events","html_url":"https://github.com/rtsao/browser-unhandled-rejection/issues/9","id":336501151,"node_id":"MDU6SXNzdWUzMzY1MDExNTE=","number":9,"title":"Polyfill does not handle returned rejections properly","user":{"login":"scriby","id":815188,"node_id":"MDQ6VXNlcjgxNTE4OA==","avatar_url":"https://avatars0.githubusercontent.com/u/815188?v=4","gravatar_id":"","url":"https://api.github.com/users/scriby","html_url":"https://github.com/scriby","followers_url":"https://api.github.com/users/scriby/followers","following_url":"https://api.github.com/users/scriby/following{/other_user}","gists_url":"https://api.github.com/users/scriby/gists{/gist_id}","starred_url":"https://api.github.com/users/scriby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scriby/subscriptions","organizations_url":"https://api.github.com/users/scriby/orgs","repos_url":"https://api.github.com/users/scriby/repos","events_url":"https://api.github.com/users/scriby/events{/privacy}","received_events_url":"https://api.github.com/users/scriby/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-28T07:16:27Z","updated_at":"2018-06-28T07:16:27Z","closed_at":null,"author_association":"NONE","body":"```\r\ntest(`does not trigger event for recovered downstream 2 (${name})`, t => {\r\n    t.plan(1);\r\n    let count = 0;\r\n    const reason = 'rejection';\r\n    const listener = (e) => {\r\n      count++;\r\n    }\r\n    window.addEventListener('unhandledrejection', listener);\r\n\r\n    const promise = MyPromise.resolve().then(() => {\r\n      return MyPromise.reject(reason);\r\n    }).catch(() => {}).then(() => {});\r\n\r\n    macrotask(() => {\r\n      t.equal(count, 0, 'handler is not called');\r\n      window.removeEventListener('unhandledrejection', listener);\r\n    });\r\n  });\r\n```\r\n\r\nThe above test case will trigger an unhandledrejection even though a catch is present. The reason is that the inner MyPromise.reject doesn't have any chained promises."}}
{"actor":{"display_login":"scriby"}}