{"action":"created","comment":{"url":"https://api.github.com/repos/angular/angular/pulls/comments/46204781","id":46204781,"diff_hunk":"@@ -0,0 +1,100 @@\n+// Because Angular is using dart:html, we need these tests to run on an actual\n+// browser. This means that it should be run with `-p dartium` or `-p chrome`.\n+@TestOn(\"browser\")\n+import \"package:angular2/angular2.dart\"\n+    show Component, View, NgFor, provide, Inject, Injectable, Optional;\n+\n+import 'package:test/test.dart';\n+import \"package:angular2_testing/angular2_testing.dart\";\n+\n+// This is the component we will be testing.\n+@Component(selector: 'test-cmp')\n+@View(directives: const [NgFor])\n+class TestComponent {\n+  List<num> items;\n+  TestComponent() {\n+    this.items = [1, 2];\n+  }\n+}\n+\n+@Injectable()\n+class TestService {\n+  String status = \"not ready\";\n+\n+  init() {\n+    this.status = \"ready\";\n+  }\n+}\n+\n+class MyToken {}\n+\n+const TEMPLATE =\n+    \"<div><copy-me template=\\\"ng-for #item of items\\\">{{item.toString()}};</copy-me></div>\";\n+\n+void main() {\n+  initAngularTests();\n+\n+  setUpProviders(() => [provide(MyToken, useValue: 'my string'), TestService]);\n+\n+  test(\"normal function\", () {\n+    var string = \"foo,bar,baz\";\n+    expect(string.split(\",\"), equals([\"foo\", \"bar\", \"baz\"]));\n+  });\n+\n+  ngTest(\"can grab injected values\", (@Inject(MyToken) token, TestService testService) {\n+    expect(token, equals('my string'));\n+    expect(testService.status, equals('not ready'));\n+  });\n+\n+  group(\"nested ngSetUp\", () {\n+    ngSetUp((TestService testService) {\n+      testService.init();\n+    });\n+\n+    ngTest(\"ngSetUp modifies injected services\", (TestService testService) {\n+      expect(testService.status, equals('ready'));\n+    });\n+  });\n+\n+  ngTest(\"create a component using the TestComponentBuilder\", (TestComponentBuilder tcb) async {\n+    print('running');\n+    var rootTC = await tcb\n+        .overrideTemplate(TestComponent, TEMPLATE)\n+        .createAsync(TestComponent);\n+\n+    rootTC.detectChanges();\n+    expect(rootTC.debugElement.nativeElement.text, equals(\"1;2;\"));\n+  });\n+\n+  ngTest(\"should reflect added elements\", (TestComponentBuilder tcb) async {\n+    var rootTC = await tcb\n+        .overrideTemplate(TestComponent, TEMPLATE)\n+        .createAsync(TestComponent);\n+\n+    rootTC.detectChanges();\n+    ((rootTC.debugElement.componentInstance.items as List<num>)).add(3);","path":"modules_dart/angular2_testing/test/angular2_testing_test.dart","position":75,"original_position":75,"commit_id":"1c3ca357e0e750693e0209487daa843c39cc1e3b","original_commit_id":"1c3ca357e0e750693e0209487daa843c39cc1e3b","user":{"login":"kevmoo","id":17034,"avatar_url":"https://avatars.githubusercontent.com/u/17034?v=3","gravatar_id":"","url":"https://api.github.com/users/kevmoo","html_url":"https://github.com/kevmoo","followers_url":"https://api.github.com/users/kevmoo/followers","following_url":"https://api.github.com/users/kevmoo/following{/other_user}","gists_url":"https://api.github.com/users/kevmoo/gists{/gist_id}","starred_url":"https://api.github.com/users/kevmoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevmoo/subscriptions","organizations_url":"https://api.github.com/users/kevmoo/orgs","repos_url":"https://api.github.com/users/kevmoo/repos","events_url":"https://api.github.com/users/kevmoo/events{/privacy}","received_events_url":"https://api.github.com/users/kevmoo/received_events","type":"User","site_admin":false},"body":"Too many parens?","created_at":"2015-11-30T21:15:51Z","updated_at":"2015-11-30T21:15:51Z","html_url":"https://github.com/angular/angular/pull/3289#discussion_r46204781","pull_request_url":"https://api.github.com/repos/angular/angular/pulls/3289","_links":{"self":{"href":"https://api.github.com/repos/angular/angular/pulls/comments/46204781"},"html":{"href":"https://github.com/angular/angular/pull/3289#discussion_r46204781"},"pull_request":{"href":"https://api.github.com/repos/angular/angular/pulls/3289"}}},"pull_request":{"url":"https://api.github.com/repos/angular/angular/pulls/3289","id":40827244,"html_url":"https://github.com/angular/angular/pull/3289","diff_url":"https://github.com/angular/angular/pull/3289.diff","patch_url":"https://github.com/angular/angular/pull/3289.patch","issue_url":"https://api.github.com/repos/angular/angular/issues/3289","number":3289,"state":"open","locked":false,"title":"feat(test): test Library for Dart users","user":{"login":"juliemr","id":2081709,"avatar_url":"https://avatars.githubusercontent.com/u/2081709?v=3","gravatar_id":"","url":"https://api.github.com/users/juliemr","html_url":"https://github.com/juliemr","followers_url":"https://api.github.com/users/juliemr/followers","following_url":"https://api.github.com/users/juliemr/following{/other_user}","gists_url":"https://api.github.com/users/juliemr/gists{/gist_id}","starred_url":"https://api.github.com/users/juliemr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juliemr/subscriptions","organizations_url":"https://api.github.com/users/juliemr/orgs","repos_url":"https://api.github.com/users/juliemr/repos","events_url":"https://api.github.com/users/juliemr/events{/privacy}","received_events_url":"https://api.github.com/users/juliemr/received_events","type":"User","site_admin":false},"body":"This is a work in progress separate dart module for Dart consumers of Angular2 who wish to test on top of `dart:test`.","created_at":"2015-07-25T00:31:55Z","updated_at":"2015-11-30T21:15:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3972bde50cb2f9abe7e0cda05da68ce6110872a4","assignee":{"login":"juliemr","id":2081709,"avatar_url":"https://avatars.githubusercontent.com/u/2081709?v=3","gravatar_id":"","url":"https://api.github.com/users/juliemr","html_url":"https://github.com/juliemr","followers_url":"https://api.github.com/users/juliemr/followers","following_url":"https://api.github.com/users/juliemr/following{/other_user}","gists_url":"https://api.github.com/users/juliemr/gists{/gist_id}","starred_url":"https://api.github.com/users/juliemr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juliemr/subscriptions","organizations_url":"https://api.github.com/users/juliemr/orgs","repos_url":"https://api.github.com/users/juliemr/repos","events_url":"https://api.github.com/users/juliemr/events{/privacy}","received_events_url":"https://api.github.com/users/juliemr/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/angular/angular/milestones/49","html_url":"https://github.com/angular/angular/milestones/beta-00","labels_url":"https://api.github.com/repos/angular/angular/milestones/49/labels","id":1339148,"number":49,"title":"beta-00","description":"Issues which must close before we declare beta.","creator":{"login":"naomiblack","id":2286589,"avatar_url":"https://avatars.githubusercontent.com/u/2286589?v=3","gravatar_id":"","url":"https://api.github.com/users/naomiblack","html_url":"https://github.com/naomiblack","followers_url":"https://api.github.com/users/naomiblack/followers","following_url":"https://api.github.com/users/naomiblack/following{/other_user}","gists_url":"https://api.github.com/users/naomiblack/gists{/gist_id}","starred_url":"https://api.github.com/users/naomiblack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/naomiblack/subscriptions","organizations_url":"https://api.github.com/users/naomiblack/orgs","repos_url":"https://api.github.com/users/naomiblack/repos","events_url":"https://api.github.com/users/naomiblack/events{/privacy}","received_events_url":"https://api.github.com/users/naomiblack/received_events","type":"User","site_admin":false},"open_issues":63,"closed_issues":102,"state":"open","created_at":"2015-10-05T21:32:20Z","updated_at":"2015-11-30T20:17:20Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/angular/angular/pulls/3289/commits","review_comments_url":"https://api.github.com/repos/angular/angular/pulls/3289/comments","review_comment_url":"https://api.github.com/repos/angular/angular/pulls/comments{/number}","comments_url":"https://api.github.com/repos/angular/angular/issues/3289/comments","statuses_url":"https://api.github.com/repos/angular/angular/statuses/1c3ca357e0e750693e0209487daa843c39cc1e3b","head":{"label":"juliemr:test-lib-package-3","ref":"test-lib-package-3","sha":"1c3ca357e0e750693e0209487daa843c39cc1e3b","user":{"login":"juliemr","id":2081709,"avatar_url":"https://avatars.githubusercontent.com/u/2081709?v=3","gravatar_id":"","url":"https://api.github.com/users/juliemr","html_url":"https://github.com/juliemr","followers_url":"https://api.github.com/users/juliemr/followers","following_url":"https://api.github.com/users/juliemr/following{/other_user}","gists_url":"https://api.github.com/users/juliemr/gists{/gist_id}","starred_url":"https://api.github.com/users/juliemr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juliemr/subscriptions","organizations_url":"https://api.github.com/users/juliemr/orgs","repos_url":"https://api.github.com/users/juliemr/repos","events_url":"https://api.github.com/users/juliemr/events{/privacy}","received_events_url":"https://api.github.com/users/juliemr/received_events","type":"User","site_admin":false},"repo":{"id":28985296,"name":"angular","full_name":"juliemr/angular","owner":{"login":"juliemr","id":2081709,"avatar_url":"https://avatars.githubusercontent.com/u/2081709?v=3","gravatar_id":"","url":"https://api.github.com/users/juliemr","html_url":"https://github.com/juliemr","followers_url":"https://api.github.com/users/juliemr/followers","following_url":"https://api.github.com/users/juliemr/following{/other_user}","gists_url":"https://api.github.com/users/juliemr/gists{/gist_id}","starred_url":"https://api.github.com/users/juliemr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juliemr/subscriptions","organizations_url":"https://api.github.com/users/juliemr/orgs","repos_url":"https://api.github.com/users/juliemr/repos","events_url":"https://api.github.com/users/juliemr/events{/privacy}","received_events_url":"https://api.github.com/users/juliemr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/juliemr/angular","description":"","fork":true,"url":"https://api.github.com/repos/juliemr/angular","forks_url":"https://api.github.com/repos/juliemr/angular/forks","keys_url":"https://api.github.com/repos/juliemr/angular/keys{/key_id}","collaborators_url":"https://api.github.com/repos/juliemr/angular/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/juliemr/angular/teams","hooks_url":"https://api.github.com/repos/juliemr/angular/hooks","issue_events_url":"https://api.github.com/repos/juliemr/angular/issues/events{/number}","events_url":"https://api.github.com/repos/juliemr/angular/events","assignees_url":"https://api.github.com/repos/juliemr/angular/assignees{/user}","branches_url":"https://api.github.com/repos/juliemr/angular/branches{/branch}","tags_url":"https://api.github.com/repos/juliemr/angular/tags","blobs_url":"https://api.github.com/repos/juliemr/angular/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/juliemr/angular/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/juliemr/angular/git/refs{/sha}","trees_url":"https://api.github.com/repos/juliemr/angular/git/trees{/sha}","statuses_url":"https://api.github.com/repos/juliemr/angular/statuses/{sha}","languages_url":"https://api.github.com/repos/juliemr/angular/languages","stargazers_url":"https://api.github.com/repos/juliemr/angular/stargazers","contributors_url":"https://api.github.com/repos/juliemr/angular/contributors","subscribers_url":"https://api.github.com/repos/juliemr/angular/subscribers","subscription_url":"https://api.github.com/repos/juliemr/angular/subscription","commits_url":"https://api.github.com/repos/juliemr/angular/commits{/sha}","git_commits_url":"https://api.github.com/repos/juliemr/angular/git/commits{/sha}","comments_url":"https://api.github.com/repos/juliemr/angular/comments{/number}","issue_comment_url":"https://api.github.com/repos/juliemr/angular/issues/comments{/number}","contents_url":"https://api.github.com/repos/juliemr/angular/contents/{+path}","compare_url":"https://api.github.com/repos/juliemr/angular/compare/{base}...{head}","merges_url":"https://api.github.com/repos/juliemr/angular/merges","archive_url":"https://api.github.com/repos/juliemr/angular/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/juliemr/angular/downloads","issues_url":"https://api.github.com/repos/juliemr/angular/issues{/number}","pulls_url":"https://api.github.com/repos/juliemr/angular/pulls{/number}","milestones_url":"https://api.github.com/repos/juliemr/angular/milestones{/number}","notifications_url":"https://api.github.com/repos/juliemr/angular/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/juliemr/angular/labels{/name}","releases_url":"https://api.github.com/repos/juliemr/angular/releases{/id}","created_at":"2015-01-08T20:46:47Z","updated_at":"2015-07-16T01:51:08Z","pushed_at":"2015-11-30T20:59:46Z","git_url":"git://github.com/juliemr/angular.git","ssh_url":"git@github.com:juliemr/angular.git","clone_url":"https://github.com/juliemr/angular.git","svn_url":"https://github.com/juliemr/angular","homepage":null,"size":19934,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"angular:master","ref":"master","sha":"65bdf42903976746424f98b2d76ab7d993a2bf96","user":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"repo":{"id":24195339,"name":"angular","full_name":"angular/angular","owner":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/angular/angular","description":"","fork":false,"url":"https://api.github.com/repos/angular/angular","forks_url":"https://api.github.com/repos/angular/angular/forks","keys_url":"https://api.github.com/repos/angular/angular/keys{/key_id}","collaborators_url":"https://api.github.com/repos/angular/angular/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/angular/angular/teams","hooks_url":"https://api.github.com/repos/angular/angular/hooks","issue_events_url":"https://api.github.com/repos/angular/angular/issues/events{/number}","events_url":"https://api.github.com/repos/angular/angular/events","assignees_url":"https://api.github.com/repos/angular/angular/assignees{/user}","branches_url":"https://api.github.com/repos/angular/angular/branches{/branch}","tags_url":"https://api.github.com/repos/angular/angular/tags","blobs_url":"https://api.github.com/repos/angular/angular/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/angular/angular/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/angular/angular/git/refs{/sha}","trees_url":"https://api.github.com/repos/angular/angular/git/trees{/sha}","statuses_url":"https://api.github.com/repos/angular/angular/statuses/{sha}","languages_url":"https://api.github.com/repos/angular/angular/languages","stargazers_url":"https://api.github.com/repos/angular/angular/stargazers","contributors_url":"https://api.github.com/repos/angular/angular/contributors","subscribers_url":"https://api.github.com/repos/angular/angular/subscribers","subscription_url":"https://api.github.com/repos/angular/angular/subscription","commits_url":"https://api.github.com/repos/angular/angular/commits{/sha}","git_commits_url":"https://api.github.com/repos/angular/angular/git/commits{/sha}","comments_url":"https://api.github.com/repos/angular/angular/comments{/number}","issue_comment_url":"https://api.github.com/repos/angular/angular/issues/comments{/number}","contents_url":"https://api.github.com/repos/angular/angular/contents/{+path}","compare_url":"https://api.github.com/repos/angular/angular/compare/{base}...{head}","merges_url":"https://api.github.com/repos/angular/angular/merges","archive_url":"https://api.github.com/repos/angular/angular/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/angular/angular/downloads","issues_url":"https://api.github.com/repos/angular/angular/issues{/number}","pulls_url":"https://api.github.com/repos/angular/angular/pulls{/number}","milestones_url":"https://api.github.com/repos/angular/angular/milestones{/number}","notifications_url":"https://api.github.com/repos/angular/angular/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/angular/angular/labels{/name}","releases_url":"https://api.github.com/repos/angular/angular/releases{/id}","created_at":"2014-09-18T16:12:01Z","updated_at":"2015-11-30T20:59:33Z","pushed_at":"2015-11-30T21:03:59Z","git_url":"git://github.com/angular/angular.git","ssh_url":"git@github.com:angular/angular.git","clone_url":"https://github.com/angular/angular.git","svn_url":"https://github.com/angular/angular","homepage":"https://angular.io","size":40699,"stargazers_count":6897,"watchers_count":6897,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1841,"mirror_url":null,"open_issues_count":678,"forks":1841,"open_issues":678,"watchers":6897,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/angular/angular/pulls/3289"},"html":{"href":"https://github.com/angular/angular/pull/3289"},"issue":{"href":"https://api.github.com/repos/angular/angular/issues/3289"},"comments":{"href":"https://api.github.com/repos/angular/angular/issues/3289/comments"},"review_comments":{"href":"https://api.github.com/repos/angular/angular/pulls/3289/comments"},"review_comment":{"href":"https://api.github.com/repos/angular/angular/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/angular/angular/pulls/3289/commits"},"statuses":{"href":"https://api.github.com/repos/angular/angular/statuses/1c3ca357e0e750693e0209487daa843c39cc1e3b"}}}}