{"action":"closed","issue":{"url":"https://api.github.com/repos/tapjs/node-tap/issues/462","repository_url":"https://api.github.com/repos/tapjs/node-tap","labels_url":"https://api.github.com/repos/tapjs/node-tap/issues/462/labels{/name}","comments_url":"https://api.github.com/repos/tapjs/node-tap/issues/462/comments","events_url":"https://api.github.com/repos/tapjs/node-tap/issues/462/events","html_url":"https://github.com/tapjs/node-tap/issues/462","id":346514126,"node_id":"MDU6SXNzdWUzNDY1MTQxMjY=","number":462,"title":"tap is not waiting for t.tearDown to finish","user":{"login":"sarneeh","id":11553624,"node_id":"MDQ6VXNlcjExNTUzNjI0","avatar_url":"https://avatars2.githubusercontent.com/u/11553624?v=4","gravatar_id":"","url":"https://api.github.com/users/sarneeh","html_url":"https://github.com/sarneeh","followers_url":"https://api.github.com/users/sarneeh/followers","following_url":"https://api.github.com/users/sarneeh/following{/other_user}","gists_url":"https://api.github.com/users/sarneeh/gists{/gist_id}","starred_url":"https://api.github.com/users/sarneeh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sarneeh/subscriptions","organizations_url":"https://api.github.com/users/sarneeh/orgs","repos_url":"https://api.github.com/users/sarneeh/repos","events_url":"https://api.github.com/users/sarneeh/events{/privacy}","received_events_url":"https://api.github.com/users/sarneeh/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-08-01T09:12:59Z","updated_at":"2018-08-02T18:15:48Z","closed_at":"2018-08-02T18:15:48Z","author_association":"NONE","body":"Is `async/await` supported by `tearDown` method? Because it looks like it's not. Take a lot at this example:\r\n\r\n```js\r\nconst { test } = require('tap');\r\n\r\nconst someAsyncFunc = () => new Promise(resolve => setTimeout(resolve, 500));\r\n\r\ntest('suite setup', t => {\r\n  console.log('setting up...');\r\n  t.end();\r\n});\r\n\r\ntest('test', t => {\r\n  console.log('testing stuff...');\r\n\r\n  t.tearDown(async () => {\r\n    await someAsyncFunc();\r\n    console.log('test teardown...');\r\n  });\r\n\r\n  t.end();\r\n});\r\n\r\ntest('suite teardown', t => {\r\n  console.log('shutting down...');\r\n  t.end();\r\n});\r\n```\r\n\r\nThe result is:\r\n\r\n```\r\nTAP version 13\r\nsetting up...\r\n# Subtest: suite setup\r\n    1..0\r\nok 1 - suite setup # time=2.128ms\r\n\r\ntesting stuff...\r\n# Subtest: test\r\n    1..0\r\nok 2 - test # time=0.495ms\r\n\r\nshutting down...\r\n# Subtest: suite teardown\r\n    1..0\r\nok 3 - suite teardown # time=0.31ms\r\n\r\ntest teardown...\r\n1..3\r\n# time=511.285ms\r\n```\r\n\r\nAs you can see - another test is launching before the previous one actually ended. Is this a bug or is this an expected behaviour?"}}
{"actor":{"display_login":"sarneeh"}}