{"action":"closed","issue":{"url":"https://api.github.com/repos/cucumber/cucumber-js/issues/749","repository_url":"https://api.github.com/repos/cucumber/cucumber-js","labels_url":"https://api.github.com/repos/cucumber/cucumber-js/issues/749/labels{/name}","comments_url":"https://api.github.com/repos/cucumber/cucumber-js/issues/749/comments","events_url":"https://api.github.com/repos/cucumber/cucumber-js/issues/749/events","html_url":"https://github.com/cucumber/cucumber-js/issues/749","id":205037807,"number":749,"title":"[Question] Should a failing hook count as a scenario failure?","user":{"login":"sankargorthi","id":924700,"avatar_url":"https://avatars.githubusercontent.com/u/924700?v=3","gravatar_id":"","url":"https://api.github.com/users/sankargorthi","html_url":"https://github.com/sankargorthi","followers_url":"https://api.github.com/users/sankargorthi/followers","following_url":"https://api.github.com/users/sankargorthi/following{/other_user}","gists_url":"https://api.github.com/users/sankargorthi/gists{/gist_id}","starred_url":"https://api.github.com/users/sankargorthi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sankargorthi/subscriptions","organizations_url":"https://api.github.com/users/sankargorthi/orgs","repos_url":"https://api.github.com/users/sankargorthi/repos","events_url":"https://api.github.com/users/sankargorthi/events{/privacy}","received_events_url":"https://api.github.com/users/sankargorthi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-02-03T00:19:25Z","updated_at":"2017-02-04T21:33:54Z","closed_at":"2017-02-04T21:33:54Z","body":"I have about 10 scenarios, with 4 that show the relevant step failing, so far; I hat not noticed an error I'd introduced into a hook:\r\n\r\n```javascript\r\nimport {unlinkSync} from 'mz/fs';\r\nimport {defineSupportCode} from 'cucumber';\r\n\r\ndefineSupportCode(function ({After}) {\r\n  After(function* () {\r\n    yield unlinkSync('file.out');\r\n    /**** This is an error as the sync function returns undefined ***/\r\n  });\r\n});\r\n```\r\n\r\n```bash\r\n1) Scenario: Scenario name - features/main.feature:15\r\n   Step: After\r\n   Step Definition: features/support/hooks.js:13\r\n   Message:\r\n     TypeError: A value undefined was yielded that could not be treated as a promise\r\n...\r\n\r\n10 scenarios (5 failed, 5 passed)\r\n60 steps (4 failed, 16 skipped, 40 passed)\r\n1m36.625s\r\nnpm ERR! Test failed.  See above for more details.\r\n```\r\n\r\nThe actual steps are not indicated as erroring out. Is this expected and normal behavior?"}}
{"actor":{"display_login":"sankargorthi"}}