{"action":"created","comment":{"url":"https://api.github.com/repos/ionic-team/stencil/pulls/comments/136687058","pull_request_review_id":60266446,"id":136687058,"diff_hunk":"@@ -0,0 +1,101 @@\n+import { h } from '../../../core/renderer/h';\n+import * as util from '../util';\n+\n+class IonTest {\n+  render() {\n+    return [\n+      h('div', 0, 'hi')\n+    ];\n+  }\n+}\n+\n+class IonThingOne {\n+  render() {\n+    return [\n+      h('div', 0, 'thing')\n+    ];\n+  }\n+}\n+\n+class IonThingTwo {\n+  x = 18;\n+  y = 24;\n+  sum() { return this.x + this.y; }\n+  render() {\n+    return [\n+      h('div', { c: 'thing' }, [\n+        h('div', { c: 'child-thing' }, 'I am the eldest'),\n+        h('div', { c: 'child-thing' }, 'Middle child rules'),\n+        h('div', { c: 'child-thing' }, 'No youngest does'),\n+        h('div', { c: 'child-thing' }, 'say wut now?'),\n+        h('div', { c: 'random-sum' }, this.sum())\n+      ])\n+    ];\n+  }\n+}\n+\n+describe('testing utilities', () => {\n+  describe('register', () => {\n+    it('returns a platform', () => {\n+      const plt = util.register();\n+      expect(plt).toBeTruthy();\n+      expect(typeof plt.defineComponent).toEqual('function');\n+      expect(typeof plt.getComponentMeta).toEqual('function');\n+      expect(typeof plt.getContextItem).toEqual('function');\n+    });\n+\n+    it('registers the components', () => {\n+      const plt = util.register(\n+        [{","path":"src/core/testing/test/util.spec.ts","position":49,"original_position":49,"commit_id":"5fb0d8d0d7aa2d254ea5dca95fbfff4bf689f2ee","original_commit_id":"5fb0d8d0d7aa2d254ea5dca95fbfff4bf689f2ee","user":{"login":"kensodemann","id":1526846,"avatar_url":"https://avatars3.githubusercontent.com/u/1526846?v=4","gravatar_id":"","url":"https://api.github.com/users/kensodemann","html_url":"https://github.com/kensodemann","followers_url":"https://api.github.com/users/kensodemann/followers","following_url":"https://api.github.com/users/kensodemann/following{/other_user}","gists_url":"https://api.github.com/users/kensodemann/gists{/gist_id}","starred_url":"https://api.github.com/users/kensodemann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kensodemann/subscriptions","organizations_url":"https://api.github.com/users/kensodemann/orgs","repos_url":"https://api.github.com/users/kensodemann/repos","events_url":"https://api.github.com/users/kensodemann/events{/privacy}","received_events_url":"https://api.github.com/users/kensodemann/received_events","type":"User","site_admin":false},"body":"I am hoping to not have to specify the `tagNameMeta` in cases where that is defined in the `@Component` decorator in a `.tsx` file, but I still need to look into how that is done.","created_at":"2017-09-02T02:11:35Z","updated_at":"2017-09-02T02:11:35Z","html_url":"https://github.com/ionic-team/stencil/pull/123#discussion_r136687058","pull_request_url":"https://api.github.com/repos/ionic-team/stencil/pulls/123","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ionic-team/stencil/pulls/comments/136687058"},"html":{"href":"https://github.com/ionic-team/stencil/pull/123#discussion_r136687058"},"pull_request":{"href":"https://api.github.com/repos/ionic-team/stencil/pulls/123"}}},"pull_request":{"url":"https://api.github.com/repos/ionic-team/stencil/pulls/123","id":138996272,"html_url":"https://github.com/ionic-team/stencil/pull/123","diff_url":"https://github.com/ionic-team/stencil/pull/123.diff","patch_url":"https://github.com/ionic-team/stencil/pull/123.patch","issue_url":"https://api.github.com/repos/ionic-team/stencil/issues/123","number":123,"state":"open","locked":false,"title":"feat(testing): layout the basic testing API","user":{"login":"kensodemann","id":1526846,"avatar_url":"https://avatars3.githubusercontent.com/u/1526846?v=4","gravatar_id":"","url":"https://api.github.com/users/kensodemann","html_url":"https://github.com/kensodemann","followers_url":"https://api.github.com/users/kensodemann/followers","following_url":"https://api.github.com/users/kensodemann/following{/other_user}","gists_url":"https://api.github.com/users/kensodemann/gists{/gist_id}","starred_url":"https://api.github.com/users/kensodemann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kensodemann/subscriptions","organizations_url":"https://api.github.com/users/kensodemann/orgs","repos_url":"https://api.github.com/users/kensodemann/repos","events_url":"https://api.github.com/users/kensodemann/events{/privacy}","received_events_url":"https://api.github.com/users/kensodemann/received_events","type":"User","site_admin":false},"body":"This is just the start of the utilities. I am still relying too heavily on the existing mock* code from test/index.ts. That should probably get moved and cleaned up, but for now I am using a lot of it.\r\n\r\nTwo functions:\r\nregister() - creates a platform, registers the defined components\r\nrender() - can be used to test the DOM or (via $instance) the component class\r\n\r\nI removed the idea of a compile() function for now since render() returns an object that defines the component class instance on $instance.\r\n\r\nNext steps:\r\n\r\n1. determine how to use with component defined in tsx file\r\n2. refactor more test/index.ts code into here","created_at":"2017-09-02T02:09:54Z","updated_at":"2017-09-02T02:11:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fe650be25e5f410ba0cf475a52013d78c7d53310","assignee":null,"assignees":[],"requested_reviewers":[{"login":"adamdbradley","id":452425,"avatar_url":"https://avatars3.githubusercontent.com/u/452425?v=4","gravatar_id":"","url":"https://api.github.com/users/adamdbradley","html_url":"https://github.com/adamdbradley","followers_url":"https://api.github.com/users/adamdbradley/followers","following_url":"https://api.github.com/users/adamdbradley/following{/other_user}","gists_url":"https://api.github.com/users/adamdbradley/gists{/gist_id}","starred_url":"https://api.github.com/users/adamdbradley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamdbradley/subscriptions","organizations_url":"https://api.github.com/users/adamdbradley/orgs","repos_url":"https://api.github.com/users/adamdbradley/repos","events_url":"https://api.github.com/users/adamdbradley/events{/privacy}","received_events_url":"https://api.github.com/users/adamdbradley/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ionic-team/stencil/pulls/123/commits","review_comments_url":"https://api.github.com/repos/ionic-team/stencil/pulls/123/comments","review_comment_url":"https://api.github.com/repos/ionic-team/stencil/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ionic-team/stencil/issues/123/comments","statuses_url":"https://api.github.com/repos/ionic-team/stencil/statuses/5fb0d8d0d7aa2d254ea5dca95fbfff4bf689f2ee","head":{"label":"ionic-team:feat/testUtilities","ref":"feat/testUtilities","sha":"5fb0d8d0d7aa2d254ea5dca95fbfff4bf689f2ee","user":{"login":"ionic-team","id":3171503,"avatar_url":"https://avatars0.githubusercontent.com/u/3171503?v=4","gravatar_id":"","url":"https://api.github.com/users/ionic-team","html_url":"https://github.com/ionic-team","followers_url":"https://api.github.com/users/ionic-team/followers","following_url":"https://api.github.com/users/ionic-team/following{/other_user}","gists_url":"https://api.github.com/users/ionic-team/gists{/gist_id}","starred_url":"https://api.github.com/users/ionic-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ionic-team/subscriptions","organizations_url":"https://api.github.com/users/ionic-team/orgs","repos_url":"https://api.github.com/users/ionic-team/repos","events_url":"https://api.github.com/users/ionic-team/events{/privacy}","received_events_url":"https://api.github.com/users/ionic-team/received_events","type":"Organization","site_admin":false},"repo":{"id":82095231,"name":"stencil","full_name":"ionic-team/stencil","owner":{"login":"ionic-team","id":3171503,"avatar_url":"https://avatars0.githubusercontent.com/u/3171503?v=4","gravatar_id":"","url":"https://api.github.com/users/ionic-team","html_url":"https://github.com/ionic-team","followers_url":"https://api.github.com/users/ionic-team/followers","following_url":"https://api.github.com/users/ionic-team/following{/other_user}","gists_url":"https://api.github.com/users/ionic-team/gists{/gist_id}","starred_url":"https://api.github.com/users/ionic-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ionic-team/subscriptions","organizations_url":"https://api.github.com/users/ionic-team/orgs","repos_url":"https://api.github.com/users/ionic-team/repos","events_url":"https://api.github.com/users/ionic-team/events{/privacy}","received_events_url":"https://api.github.com/users/ionic-team/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ionic-team/stencil","description":"Stencil: A Compiler for Web Components","fork":false,"url":"https://api.github.com/repos/ionic-team/stencil","forks_url":"https://api.github.com/repos/ionic-team/stencil/forks","keys_url":"https://api.github.com/repos/ionic-team/stencil/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ionic-team/stencil/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ionic-team/stencil/teams","hooks_url":"https://api.github.com/repos/ionic-team/stencil/hooks","issue_events_url":"https://api.github.com/repos/ionic-team/stencil/issues/events{/number}","events_url":"https://api.github.com/repos/ionic-team/stencil/events","assignees_url":"https://api.github.com/repos/ionic-team/stencil/assignees{/user}","branches_url":"https://api.github.com/repos/ionic-team/stencil/branches{/branch}","tags_url":"https://api.github.com/repos/ionic-team/stencil/tags","blobs_url":"https://api.github.com/repos/ionic-team/stencil/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ionic-team/stencil/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ionic-team/stencil/git/refs{/sha}","trees_url":"https://api.github.com/repos/ionic-team/stencil/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ionic-team/stencil/statuses/{sha}","languages_url":"https://api.github.com/repos/ionic-team/stencil/languages","stargazers_url":"https://api.github.com/repos/ionic-team/stencil/stargazers","contributors_url":"https://api.github.com/repos/ionic-team/stencil/contributors","subscribers_url":"https://api.github.com/repos/ionic-team/stencil/subscribers","subscription_url":"https://api.github.com/repos/ionic-team/stencil/subscription","commits_url":"https://api.github.com/repos/ionic-team/stencil/commits{/sha}","git_commits_url":"https://api.github.com/repos/ionic-team/stencil/git/commits{/sha}","comments_url":"https://api.github.com/repos/ionic-team/stencil/comments{/number}","issue_comment_url":"https://api.github.com/repos/ionic-team/stencil/issues/comments{/number}","contents_url":"https://api.github.com/repos/ionic-team/stencil/contents/{+path}","compare_url":"https://api.github.com/repos/ionic-team/stencil/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ionic-team/stencil/merges","archive_url":"https://api.github.com/repos/ionic-team/stencil/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ionic-team/stencil/downloads","issues_url":"https://api.github.com/repos/ionic-team/stencil/issues{/number}","pulls_url":"https://api.github.com/repos/ionic-team/stencil/pulls{/number}","milestones_url":"https://api.github.com/repos/ionic-team/stencil/milestones{/number}","notifications_url":"https://api.github.com/repos/ionic-team/stencil/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ionic-team/stencil/labels{/name}","releases_url":"https://api.github.com/repos/ionic-team/stencil/releases{/id}","deployments_url":"https://api.github.com/repos/ionic-team/stencil/deployments","created_at":"2017-02-15T18:57:07Z","updated_at":"2017-09-02T01:19:38Z","pushed_at":"2017-09-02T02:09:55Z","git_url":"git://github.com/ionic-team/stencil.git","ssh_url":"git@github.com:ionic-team/stencil.git","clone_url":"https://github.com/ionic-team/stencil.git","svn_url":"https://github.com/ionic-team/stencil","homepage":"https://stenciljs.com/","size":43352,"stargazers_count":658,"watchers_count":658,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":11,"forks":18,"open_issues":11,"watchers":658,"default_branch":"master"}},"base":{"label":"ionic-team:master","ref":"master","sha":"ca80ca3d0fb69bdcd07d1a00b6211982f725dcf0","user":{"login":"ionic-team","id":3171503,"avatar_url":"https://avatars0.githubusercontent.com/u/3171503?v=4","gravatar_id":"","url":"https://api.github.com/users/ionic-team","html_url":"https://github.com/ionic-team","followers_url":"https://api.github.com/users/ionic-team/followers","following_url":"https://api.github.com/users/ionic-team/following{/other_user}","gists_url":"https://api.github.com/users/ionic-team/gists{/gist_id}","starred_url":"https://api.github.com/users/ionic-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ionic-team/subscriptions","organizations_url":"https://api.github.com/users/ionic-team/orgs","repos_url":"https://api.github.com/users/ionic-team/repos","events_url":"https://api.github.com/users/ionic-team/events{/privacy}","received_events_url":"https://api.github.com/users/ionic-team/received_events","type":"Organization","site_admin":false},"repo":{"id":82095231,"name":"stencil","full_name":"ionic-team/stencil","owner":{"login":"ionic-team","id":3171503,"avatar_url":"https://avatars0.githubusercontent.com/u/3171503?v=4","gravatar_id":"","url":"https://api.github.com/users/ionic-team","html_url":"https://github.com/ionic-team","followers_url":"https://api.github.com/users/ionic-team/followers","following_url":"https://api.github.com/users/ionic-team/following{/other_user}","gists_url":"https://api.github.com/users/ionic-team/gists{/gist_id}","starred_url":"https://api.github.com/users/ionic-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ionic-team/subscriptions","organizations_url":"https://api.github.com/users/ionic-team/orgs","repos_url":"https://api.github.com/users/ionic-team/repos","events_url":"https://api.github.com/users/ionic-team/events{/privacy}","received_events_url":"https://api.github.com/users/ionic-team/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ionic-team/stencil","description":"Stencil: A Compiler for Web Components","fork":false,"url":"https://api.github.com/repos/ionic-team/stencil","forks_url":"https://api.github.com/repos/ionic-team/stencil/forks","keys_url":"https://api.github.com/repos/ionic-team/stencil/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ionic-team/stencil/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ionic-team/stencil/teams","hooks_url":"https://api.github.com/repos/ionic-team/stencil/hooks","issue_events_url":"https://api.github.com/repos/ionic-team/stencil/issues/events{/number}","events_url":"https://api.github.com/repos/ionic-team/stencil/events","assignees_url":"https://api.github.com/repos/ionic-team/stencil/assignees{/user}","branches_url":"https://api.github.com/repos/ionic-team/stencil/branches{/branch}","tags_url":"https://api.github.com/repos/ionic-team/stencil/tags","blobs_url":"https://api.github.com/repos/ionic-team/stencil/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ionic-team/stencil/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ionic-team/stencil/git/refs{/sha}","trees_url":"https://api.github.com/repos/ionic-team/stencil/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ionic-team/stencil/statuses/{sha}","languages_url":"https://api.github.com/repos/ionic-team/stencil/languages","stargazers_url":"https://api.github.com/repos/ionic-team/stencil/stargazers","contributors_url":"https://api.github.com/repos/ionic-team/stencil/contributors","subscribers_url":"https://api.github.com/repos/ionic-team/stencil/subscribers","subscription_url":"https://api.github.com/repos/ionic-team/stencil/subscription","commits_url":"https://api.github.com/repos/ionic-team/stencil/commits{/sha}","git_commits_url":"https://api.github.com/repos/ionic-team/stencil/git/commits{/sha}","comments_url":"https://api.github.com/repos/ionic-team/stencil/comments{/number}","issue_comment_url":"https://api.github.com/repos/ionic-team/stencil/issues/comments{/number}","contents_url":"https://api.github.com/repos/ionic-team/stencil/contents/{+path}","compare_url":"https://api.github.com/repos/ionic-team/stencil/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ionic-team/stencil/merges","archive_url":"https://api.github.com/repos/ionic-team/stencil/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ionic-team/stencil/downloads","issues_url":"https://api.github.com/repos/ionic-team/stencil/issues{/number}","pulls_url":"https://api.github.com/repos/ionic-team/stencil/pulls{/number}","milestones_url":"https://api.github.com/repos/ionic-team/stencil/milestones{/number}","notifications_url":"https://api.github.com/repos/ionic-team/stencil/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ionic-team/stencil/labels{/name}","releases_url":"https://api.github.com/repos/ionic-team/stencil/releases{/id}","deployments_url":"https://api.github.com/repos/ionic-team/stencil/deployments","created_at":"2017-02-15T18:57:07Z","updated_at":"2017-09-02T01:19:38Z","pushed_at":"2017-09-02T02:09:55Z","git_url":"git://github.com/ionic-team/stencil.git","ssh_url":"git@github.com:ionic-team/stencil.git","clone_url":"https://github.com/ionic-team/stencil.git","svn_url":"https://github.com/ionic-team/stencil","homepage":"https://stenciljs.com/","size":43352,"stargazers_count":658,"watchers_count":658,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":11,"forks":18,"open_issues":11,"watchers":658,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ionic-team/stencil/pulls/123"},"html":{"href":"https://github.com/ionic-team/stencil/pull/123"},"issue":{"href":"https://api.github.com/repos/ionic-team/stencil/issues/123"},"comments":{"href":"https://api.github.com/repos/ionic-team/stencil/issues/123/comments"},"review_comments":{"href":"https://api.github.com/repos/ionic-team/stencil/pulls/123/comments"},"review_comment":{"href":"https://api.github.com/repos/ionic-team/stencil/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ionic-team/stencil/pulls/123/commits"},"statuses":{"href":"https://api.github.com/repos/ionic-team/stencil/statuses/5fb0d8d0d7aa2d254ea5dca95fbfff4bf689f2ee"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"kensodemann"}}