{"action":"opened","issue":{"url":"https://api.github.com/repos/martinfowler-cn/trans-tasks/issues/474","repository_url":"https://api.github.com/repos/martinfowler-cn/trans-tasks","labels_url":"https://api.github.com/repos/martinfowler-cn/trans-tasks/issues/474/labels{/name}","comments_url":"https://api.github.com/repos/martinfowler-cn/trans-tasks/issues/474/comments","events_url":"https://api.github.com/repos/martinfowler-cn/trans-tasks/issues/474/events","html_url":"https://github.com/martinfowler-cn/trans-tasks/issues/474","id":387557362,"node_id":"MDU6SXNzdWUzODc1NTczNjI=","number":474,"title":"Testing Asynchronous JavaScript","user":{"login":"TARS-robot","id":45490639,"node_id":"MDQ6VXNlcjQ1NDkwNjM5","avatar_url":"https://avatars1.githubusercontent.com/u/45490639?v=4","gravatar_id":"","url":"https://api.github.com/users/TARS-robot","html_url":"https://github.com/TARS-robot","followers_url":"https://api.github.com/users/TARS-robot/followers","following_url":"https://api.github.com/users/TARS-robot/following{/other_user}","gists_url":"https://api.github.com/users/TARS-robot/gists{/gist_id}","starred_url":"https://api.github.com/users/TARS-robot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TARS-robot/subscriptions","organizations_url":"https://api.github.com/users/TARS-robot/orgs","repos_url":"https://api.github.com/users/TARS-robot/repos","events_url":"https://api.github.com/users/TARS-robot/events{/privacy}","received_events_url":"https://api.github.com/users/TARS-robot/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-05T01:45:40Z","updated_at":"2018-12-05T01:45:40Z","closed_at":null,"author_association":"COLLABORATOR","body":"https://martinfowler.com/articles/asyncJS.html\nTesting Asynchronous JavaScript\nby Pete Hodgson\n18 September 2013\n\nThere seems to be a common misconception in the JavaScript community that testing asynchronous code requires a different approach than testing ‘regular’ synchronous code. In this post I’ll explain why that’s not generally the case. I’ll highlight the difference between testing a unit of code which supports async behavior, as opposed code which is inherently asynchronous. I’ll also show how promise-based async code lends itself to clean and succinct unit tests which can be tested in a clear, readable way while still validating async behaviour.\n"}}
{"actor":{"display_login":"TARS-robot"}}