{"action":"closed","issue":{"url":"https://api.github.com/repos/facebook/jest/issues/6401","repository_url":"https://api.github.com/repos/facebook/jest","labels_url":"https://api.github.com/repos/facebook/jest/issues/6401/labels{/name}","comments_url":"https://api.github.com/repos/facebook/jest/issues/6401/comments","events_url":"https://api.github.com/repos/facebook/jest/issues/6401/events","html_url":"https://github.com/facebook/jest/issues/6401","id":329649926,"node_id":"MDU6SXNzdWUzMjk2NDk5MjY=","number":6401,"title":"afterAll times out silently","user":{"login":"DragonAxe","id":12703200,"node_id":"MDQ6VXNlcjEyNzAzMjAw","avatar_url":"https://avatars1.githubusercontent.com/u/12703200?v=4","gravatar_id":"","url":"https://api.github.com/users/DragonAxe","html_url":"https://github.com/DragonAxe","followers_url":"https://api.github.com/users/DragonAxe/followers","following_url":"https://api.github.com/users/DragonAxe/following{/other_user}","gists_url":"https://api.github.com/users/DragonAxe/gists{/gist_id}","starred_url":"https://api.github.com/users/DragonAxe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DragonAxe/subscriptions","organizations_url":"https://api.github.com/users/DragonAxe/orgs","repos_url":"https://api.github.com/users/DragonAxe/repos","events_url":"https://api.github.com/users/DragonAxe/events{/privacy}","received_events_url":"https://api.github.com/users/DragonAxe/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-06-05T22:39:21Z","updated_at":"2018-07-06T13:45:44Z","closed_at":"2018-07-06T13:45:43Z","author_association":"NONE","body":"## 🐛 Bug Report\r\n\r\nWhen running a `describe` test with an `afterAll` block that takes longer than the specified timeout length, the test completes successfully, but no warning or message is given that the `afterAll` block timed out and wasn't able to finish.\r\n\r\n## To Reproduce\r\n\r\n1. Set up a new `npm` project with `jest`.\r\n2. Create a new test file with the following contents:\r\n```javascript\r\ndescribe('timeout-tester', () => {\r\n  const timeout = ms => new Promise(res => setTimeout(res, ms));\r\n\r\n  beforeAll(async () => {\r\n    console.log('beforeAll');\r\n  }, 1000);\r\n\r\n  afterAll(async () => {\r\n    console.log('afterAll 1');\r\n    await timeout(5000);\r\n    console.log('afterAll 2');\r\n  }, 1000);\r\n\r\n  it(\r\n    'timeout?',\r\n    async () => {\r\n      console.log('test');\r\n    },\r\n    1000\r\n  );\r\n});\r\n```\r\n3. Run the test.\r\n4. Notice how the last log message in the `afterAll` block (`console.log('afterAll 2');`) isn't printed, but the test finishes successfully.\r\n\r\n## Expected behavior\r\n\r\nI feel like `jest` should let the user know that the teardown block (`afterAll`) timed out and didn't finish executing. If, in the example above, you move the `await timeout(5000);` line to the `beforeAll` block, `jest` will fail the test with the error `Timeout - Async callback was not invoked within the 1000ms timeout specified by jest.setTimeout.` which I would expect `afterAll` to do as well.\r\n\r\n## Link to repl or repo (highly encouraged)\r\n\r\nhttps://repl.it/@DragonAxe/jestAfterAllTimeout\r\n\r\n## Run `npx envinfo --preset jest`\r\n\r\n```bash\r\n  System:\r\n    OS: Linux 4.15 Pop!_OS 18.04 LTS\r\n    CPU: x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz\r\n  Binaries:\r\n    Node: 8.10.0 - /usr/bin/node\r\n    npm: 3.5.2 - /usr/bin/npm\r\n  npmPackages:\r\n    jest: 22.4.3 => 22.4.3 \r\n```\r\n"}}
{"actor":{"display_login":"thymikee"}}