{"action":"created","issue":{"url":"https://api.github.com/repos/dart-lang/test/issues/161","labels_url":"https://api.github.com/repos/dart-lang/test/issues/161/labels{/name}","comments_url":"https://api.github.com/repos/dart-lang/test/issues/161/comments","events_url":"https://api.github.com/repos/dart-lang/test/issues/161/events","html_url":"https://github.com/dart-lang/test/issues/161","id":85654806,"number":161,"title":"Corrections for the unittest article","user":{"login":"DartBot","id":8958862,"avatar_url":"https://avatars.githubusercontent.com/u/8958862?v=3","gravatar_id":"","url":"https://api.github.com/users/DartBot","html_url":"https://github.com/DartBot","followers_url":"https://api.github.com/users/DartBot/followers","following_url":"https://api.github.com/users/DartBot/following{/other_user}","gists_url":"https://api.github.com/users/DartBot/gists{/gist_id}","starred_url":"https://api.github.com/users/DartBot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DartBot/subscriptions","organizations_url":"https://api.github.com/users/DartBot/orgs","repos_url":"https://api.github.com/users/DartBot/repos","events_url":"https://api.github.com/users/DartBot/events{/privacy}","received_events_url":"https://api.github.com/users/DartBot/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dart-lang/test/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/dart-lang/test/labels/Fixed","name":"Fixed","color":"ededed"},{"url":"https://api.github.com/repos/dart-lang/test/labels/Priority-Medium","name":"Priority-Medium","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-06-05T23:17:49Z","updated_at":"2015-06-05T23:17:50Z","closed_at":null,"body":"_Originally opened as dart-lang/sdk#6307_\n\n*This issue was originally filed by jjinux...&#064;google.com*\n_____\nI jotted down some corrections when I read our article on unit testing. That was a while ago, but I'm sure some of them probably still apply.\n\n==\n\nIt documents how to test something asynchronous that uses callbacks, but it\nshould probably also document how to test something that uses futures. It's\nsubtle because you can't call expectAsync1 from a .then function because\nthat's too late.\n\n==\n\nWhy are \\_Partition and \\_QuickSort upper case? This looks like Google3 style, not Dart style.\n\n==\n\n&nbsp;&nbsp;&nbsp;&nbsp;A simple unit test example\n\nThe code should have a comment saying that there are bugs in it. I was very\npuzzled when I first read it.\n\n==\n\n&nbsp;&nbsp;&nbsp;&nbsp;#import('dart/lib/unittest/unittest.dart'); // Use an appropriate path\n\nBug: This should be something included in the standard library.\n\n==\n\n&nbsp;&nbsp;&nbsp;&nbsp;expectAsyncN\n\nBug: This should use varargs, somehow.\n\n==\n\n&nbsp;&nbsp;&nbsp;&nbsp;As types are not first class objects in Dart, this is a bit of a kludge\n&nbsp;&nbsp;&nbsp;&nbsp;but does the job. For example:\n\nIs this now fixable?"},"comment":{"url":"https://api.github.com/repos/dart-lang/test/issues/comments/109478530","html_url":"https://github.com/dart-lang/test/issues/161#issuecomment-109478530","issue_url":"https://api.github.com/repos/dart-lang/test/issues/161","id":109478530,"user":{"login":"DartBot","id":8958862,"avatar_url":"https://avatars.githubusercontent.com/u/8958862?v=3","gravatar_id":"","url":"https://api.github.com/users/DartBot","html_url":"https://github.com/DartBot","followers_url":"https://api.github.com/users/DartBot/followers","following_url":"https://api.github.com/users/DartBot/following{/other_user}","gists_url":"https://api.github.com/users/DartBot/gists{/gist_id}","starred_url":"https://api.github.com/users/DartBot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DartBot/subscriptions","organizations_url":"https://api.github.com/users/DartBot/orgs","repos_url":"https://api.github.com/users/DartBot/repos","events_url":"https://api.github.com/users/DartBot/events{/privacy}","received_events_url":"https://api.github.com/users/DartBot/received_events","type":"User","site_admin":false},"created_at":"2015-06-05T23:17:50Z","updated_at":"2015-06-05T23:17:50Z","body":"<a href=\"https://github.com/kevmoo\"><img src=\"https://avatars.githubusercontent.com/u/17034?v=3\" align=\"left\" width=\"48\" height=\"48\"hspace=\"10\"></img></a> **Comment by [kevmoo](https://github.com/kevmoo)**\n\n----\n\n*Added [Pkg-Unittest](../labels/Pkg-Unittest) label.*\n"}}