{"action":"created","issue":{"url":"https://api.github.com/repos/jquery/qunit/issues/990","repository_url":"https://api.github.com/repos/jquery/qunit","labels_url":"https://api.github.com/repos/jquery/qunit/issues/990/labels{/name}","comments_url":"https://api.github.com/repos/jquery/qunit/issues/990/comments","events_url":"https://api.github.com/repos/jquery/qunit/issues/990/events","html_url":"https://github.com/jquery/qunit/issues/990","id":149855726,"number":990,"title":"How should global error handlers resume the test runner in 2.0?","user":{"login":"platinumazure","id":284282,"avatar_url":"https://avatars.githubusercontent.com/u/284282?v=3","gravatar_id":"","url":"https://api.github.com/users/platinumazure","html_url":"https://github.com/platinumazure","followers_url":"https://api.github.com/users/platinumazure/followers","following_url":"https://api.github.com/users/platinumazure/following{/other_user}","gists_url":"https://api.github.com/users/platinumazure/gists{/gist_id}","starred_url":"https://api.github.com/users/platinumazure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/platinumazure/subscriptions","organizations_url":"https://api.github.com/users/platinumazure/orgs","repos_url":"https://api.github.com/users/platinumazure/repos","events_url":"https://api.github.com/users/platinumazure/events{/privacy}","received_events_url":"https://api.github.com/users/platinumazure/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/jquery/qunit/milestones/8","html_url":"https://github.com/jquery/qunit/milestones/async%20improvements","labels_url":"https://api.github.com/repos/jquery/qunit/milestones/8/labels","id":1721430,"number":8,"title":"async improvements","description":"","creator":{"login":"leobalter","id":301201,"avatar_url":"https://avatars.githubusercontent.com/u/301201?v=3","gravatar_id":"","url":"https://api.github.com/users/leobalter","html_url":"https://github.com/leobalter","followers_url":"https://api.github.com/users/leobalter/followers","following_url":"https://api.github.com/users/leobalter/following{/other_user}","gists_url":"https://api.github.com/users/leobalter/gists{/gist_id}","starred_url":"https://api.github.com/users/leobalter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leobalter/subscriptions","organizations_url":"https://api.github.com/users/leobalter/orgs","repos_url":"https://api.github.com/users/leobalter/repos","events_url":"https://api.github.com/users/leobalter/events{/privacy}","received_events_url":"https://api.github.com/users/leobalter/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":1,"state":"open","created_at":"2016-04-20T20:16:10Z","updated_at":"2016-06-16T00:29:18Z","due_on":null,"closed_at":null},"comments":18,"created_at":"2016-04-20T18:56:58Z","updated_at":"2016-07-22T03:55:43Z","closed_at":null,"body":"We're using QUnit and RequireJS. We've defined a `require.onError` handler as follows:\r\n\r\n```js\r\ndefine([], function () {\r\n\trequire.onError = function (e) {\r\n\t\tif (QUnit && QUnit.config) {\r\n\t\t\tif (QUnit.config.current) {\r\n\t\t\t\tvar currentTest = QUnit.config.current;\r\n\r\n\t\t\t\tcurrentTest.pushFailure(\"Died on test #\" + (currentTest.assertions.length + 1) + \" \" +\r\n\t\t\t\t\tcurrentTest.stack + \": \" + (e.message || e));\r\n\t\t\t}\r\n\r\n\t\t\t// Restart the tests if they're blocking\r\n\t\t\tif (QUnit.config.blocking) {\r\n\t\t\t\tQUnit.start();\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n});\r\n```\r\n\r\nThis is heavily inspired by how the global error handler used to handle these issues. However, `QUnit.start()` itself now throws an error (in 2.0.0-rc1), so I need a new way to resume the test runner. What is the best way to do that?"},"comment":{"url":"https://api.github.com/repos/jquery/qunit/issues/comments/234448832","html_url":"https://github.com/jquery/qunit/issues/990#issuecomment-234448832","issue_url":"https://api.github.com/repos/jquery/qunit/issues/990","id":234448832,"user":{"login":"gibson042","id":1199584,"avatar_url":"https://avatars.githubusercontent.com/u/1199584?v=3","gravatar_id":"","url":"https://api.github.com/users/gibson042","html_url":"https://github.com/gibson042","followers_url":"https://api.github.com/users/gibson042/followers","following_url":"https://api.github.com/users/gibson042/following{/other_user}","gists_url":"https://api.github.com/users/gibson042/gists{/gist_id}","starred_url":"https://api.github.com/users/gibson042/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gibson042/subscriptions","organizations_url":"https://api.github.com/users/gibson042/orgs","repos_url":"https://api.github.com/users/gibson042/repos","events_url":"https://api.github.com/users/gibson042/events{/privacy}","received_events_url":"https://api.github.com/users/gibson042/received_events","type":"User","site_admin":false},"created_at":"2016-07-22T03:55:43Z","updated_at":"2016-07-22T03:55:43Z","body":"@platinumazure I agree. As a purely internal operation, our diligence ensures that every recovery is preceded by a `pushFailure`, but as a public operation we should move that part _into_ the function."}}
{"actor":{"display_login":"gibson042"}}