payload: {"action":"created","comment":{"url":"https://api.github.com/repos/emberjs/ember-test-helpers/pulls/comments/337276226","pull_request_review_id":304895955,"id":337276226,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMzNzI3NjIyNg==","diff_hunk":"@@ -0,0 +1,52 @@\n+import { BaseContext } from './setup-context';\n+\n+export interface ITestMetadata {\n+  testName?: string;\n+  setupTypes: string[];\n+  usedHelpers: string[];\n+  [key: string]: any;\n+\n+  readonly isRendering: boolean;\n+  readonly isApplication: boolean;\n+}\n+\n+export class TestMetadata implements ITestMetadata {\n+  [key: string]: any;\n+  testName?: string;\n+  setupTypes: string[];\n+  usedHelpers: string[];\n+\n+  constructor() {\n+    this.setupTypes = [];\n+    this.usedHelpers = [];\n+  }\n+\n+  get isRendering() {\n+    return (\n+      this.setupTypes.length === 2 &&\n+      this.setupTypes.includes('setupRenderingContext') &&\n+      this.usedHelpers.includes('render')\n+    );\n+  }\n+\n+  get isApplication() {\n+    return this.setupTypes.length === 2 && this.setupTypes.includes('setupApplicationContext');\n+  }\n+}\n+\n+const TEST_METADATA = new WeakMap<BaseContext, ITestMetadata>();\n+\n+/**\n+ * Gets the test metadata associated with the provided test context. Will create\n+ * a new test metadata object if one does not exist.\n+ *\n+ * @param {BaseContext} context the context to use\n+ * @returns {ITestMetadata} the test metadata for the provided context\n+ */\n+export default function getTestMetadata(context: BaseContext): ITestMetadata {\n+  if (!TEST_METADATA.has(context)) {\n+    TEST_METADATA.set(context, new TestMetadata());\n+  }\n+\n+  return TEST_METADATA.get(context)!;","path":"addon-test-support/@ember/test-helpers/test-metadata.ts","position":51,"original_position":51,"commit_id":"a32b4ec0a6c0d58eb5c0feb1f93845d79457f87d","original_commit_id":"a32b4ec0a6c0d58eb5c0feb1f93845d79457f87d","user":{"login":"rwjblue","id":12637,"node_id":"MDQ6VXNlcjEyNjM3","avatar_url":"https://avatars0.githubusercontent.com/u/12637?v=4","gravatar_id":"","url":"https://api.github.com/users/rwjblue","html_url":"https://github.com/rwjblue","followers_url":"https://api.github.com/users/rwjblue/followers","following_url":"https://api.github.com/users/rwjblue/following{/other_user}","gists_url":"https://api.github.com/users/rwjblue/gists{/gist_id}","starred_url":"https://api.github.com/users/rwjblue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwjblue/subscriptions","organizations_url":"https://api.github.com/users/rwjblue/orgs","repos_url":"https://api.github.com/users/rwjblue/repos","events_url":"https://api.github.com/users/rwjblue/events{/privacy}","received_events_url":"https://api.github.com/users/rwjblue/received_events","type":"User","site_admin":false},"body":"Should we tweak this to something like:\r\n\r\n```js\r\nlet testMetadata = TEST_METADATA.get(context);\r\n\r\nif (testMetadata === undefined) {\r\n  testMetadata = new TestMetadata();\r\n  TEST_METADATA.set(context, testMetadata);\r\n}\r\n\r\nreturn testMetadata;\r\n```","created_at":"2019-10-21T22:57:29Z","updated_at":"2019-10-21T22:57:47Z","html_url":"https://github.com/emberjs/ember-test-helpers/pull/724#discussion_r337276226","pull_request_url":"https://api.github.com/repos/emberjs/ember-test-helpers/pulls/724","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/emberjs/ember-test-helpers/pulls/comments/337276226"},"html":{"href":"https://github.com/emberjs/ember-test-helpers/pull/724#discussion_r337276226"},"pull_request":{"href":"https://api.github.com/repos/emberjs/ember-test-helpers/pulls/724"}}},"pull_request":{"url":"https://api.github.com/repos/emberjs/ember-test-helpers/pulls/724","id":329870194,"node_id":"MDExOlB1bGxSZXF1ZXN0MzI5ODcwMTk0","html_url":"https://github.com/emberjs/ember-test-helpers/pull/724","diff_url":"https://github.com/emberjs/ember-test-helpers/pull/724.diff","patch_url":"https://github.com/emberjs/ember-test-helpers/pull/724.patch","issue_url":"https://api.github.com/repos/emberjs/ember-test-helpers/issues/724","number":724,"state":"open","locked":false,"title":"feat(test metadata): Adds test metadata primitives","user":{"login":"scalvert","id":180990,"node_id":"MDQ6VXNlcjE4MDk5MA==","avatar_url":"https://avatars2.githubusercontent.com/u/180990?v=4","gravatar_id":"","url":"https://api.github.com/users/scalvert","html_url":"https://github.com/scalvert","followers_url":"https://api.github.com/users/scalvert/followers","following_url":"https://api.github.com/users/scalvert/following{/other_user}","gists_url":"https://api.github.com/users/scalvert/gists{/gist_id}","starred_url":"https://api.github.com/users/scalvert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scalvert/subscriptions","organizations_url":"https://api.github.com/users/scalvert/orgs","repos_url":"https://api.github.com/users/scalvert/repos","events_url":"https://api.github.com/users/scalvert/events{/privacy}","received_events_url":"https://api.github.com/users/scalvert/received_events","type":"User","site_admin":false},"body":"Adds basic API for #721 ","created_at":"2019-10-18T18:23:14Z","updated_at":"2019-10-21T22:57:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"627858b69e161279b7cd648fe5fe07f21d678b6a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":96892563,"node_id":"MDU6TGFiZWw5Njg5MjU2Mw==","url":"https://api.github.com/repos/emberjs/ember-test-helpers/labels/enhancement","name":"enhancement","color":"0e8a16","default":true}],"milestone":null,"commits_url":"https://api.github.com/repos/emberjs/ember-test-helpers/pulls/724/commits","review_comments_url":"https://api.github.com/repos/emberjs/ember-test-helpers/pulls/724/comments","review_comment_url":"https://api.github.com/repos/emberjs/ember-test-helpers/pulls/comments{/number}","comments_url":"https://api.github.com/repos/emberjs/ember-test-helpers/issues/724/comments","statuses_url":"https://api.github.com/repos/emberjs/ember-test-helpers/statuses/a32b4ec0a6c0d58eb5c0feb1f93845d79457f87d","head":{"label":"scalvert:add-test-metadata","ref":"add-test-metadata","sha":"a32b4ec0a6c0d58eb5c0feb1f93845d79457f87d","user":{"login":"scalvert","id":180990,"node_id":"MDQ6VXNlcjE4MDk5MA==","avatar_url":"https://avatars2.githubusercontent.com/u/180990?v=4","gravatar_id":"","url":"https://api.github.com/users/scalvert","html_url":"https://github.com/scalvert","followers_url":"https://api.github.com/users/scalvert/followers","following_url":"https://api.github.com/users/scalvert/following{/other_user}","gists_url":"https://api.github.com/users/scalvert/gists{/gist_id}","starred_url":"https://api.github.com/users/scalvert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scalvert/subscriptions","organizations_url":"https://api.github.com/users/scalvert/orgs","repos_url":"https://api.github.com/users/scalvert/repos","events_url":"https://api.github.com/users/scalvert/events{/privacy}","received_events_url":"https://api.github.com/users/scalvert/received_events","type":"User","site_admin":false},"repo":{"id":163705112,"node_id":"MDEwOlJlcG9zaXRvcnkxNjM3MDUxMTI=","name":"ember-test-helpers","full_name":"scalvert/ember-test-helpers","private":false,"owner":{"login":"scalvert","id":180990,"node_id":"MDQ6VXNlcjE4MDk5MA==","avatar_url":"https://avatars2.githubusercontent.com/u/180990?v=4","gravatar_id":"","url":"https://api.github.com/users/scalvert","html_url":"https://github.com/scalvert","followers_url":"https://api.github.com/users/scalvert/followers","following_url":"https://api.github.com/users/scalvert/following{/other_user}","gists_url":"https://api.github.com/users/scalvert/gists{/gist_id}","starred_url":"https://api.github.com/users/scalvert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scalvert/subscriptions","organizations_url":"https://api.github.com/users/scalvert/orgs","repos_url":"https://api.github.com/users/scalvert/repos","events_url":"https://api.github.com/users/scalvert/events{/privacy}","received_events_url":"https://api.github.com/users/scalvert/received_events","type":"User","site_admin":false},"html_url":"https://github.com/scalvert/ember-test-helpers","description":"Test-framework-agnostic helpers for testing Ember.js applications","fork":true,"url":"https://api.github.com/repos/scalvert/ember-test-helpers","forks_url":"https://api.github.com/repos/scalvert/ember-test-helpers/forks","keys_url":"https://api.github.com/repos/scalvert/ember-test-helpers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scalvert/ember-test-helpers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scalvert/ember-test-helpers/teams","hooks_url":"https://api.github.com/repos/scalvert/ember-test-helpers/hooks","issue_events_url":"https://api.github.com/repos/scalvert/ember-test-helpers/issues/events{/number}","events_url":"https://api.github.com/repos/scalvert/ember-test-helpers/events","assignees_url":"https://api.github.com/repos/scalvert/ember-test-helpers/assignees{/user}","branches_url":"https://api.github.com/repos/scalvert/ember-test-helpers/branches{/branch}","tags_url":"https://api.github.com/repos/scalvert/ember-test-helpers/tags","blobs_url":"https://api.github.com/repos/scalvert/ember-test-helpers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scalvert/ember-test-helpers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scalvert/ember-test-helpers/git/refs{/sha}","trees_url":"https://api.github.com/repos/scalvert/ember-test-helpers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scalvert/ember-test-helpers/statuses/{sha}","languages_url":"https://api.github.com/repos/scalvert/ember-test-helpers/languages","stargazers_url":"https://api.github.com/repos/scalvert/ember-test-helpers/stargazers","contributors_url":"https://api.github.com/repos/scalvert/ember-test-helpers/contributors","subscribers_url":"https://api.github.com/repos/scalvert/ember-test-helpers/subscribers","subscription_url":"https://api.github.com/repos/scalvert/ember-test-helpers/subscription","commits_url":"https://api.github.com/repos/scalvert/ember-test-helpers/commits{/sha}","git_commits_url":"https://api.github.com/repos/scalvert/ember-test-helpers/git/commits{/sha}","comments_url":"https://api.github.com/repos/scalvert/ember-test-helpers/comments{/number}","issue_comment_url":"https://api.github.com/repos/scalvert/ember-test-helpers/issues/comments{/number}","contents_url":"https://api.github.com/repos/scalvert/ember-test-helpers/contents/{+path}","compare_url":"https://api.github.com/repos/scalvert/ember-test-helpers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scalvert/ember-test-helpers/merges","archive_url":"https://api.github.com/repos/scalvert/ember-test-helpers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scalvert/ember-test-helpers/downloads","issues_url":"https://api.github.com/repos/scalvert/ember-test-helpers/issues{/number}","pulls_url":"https://api.github.com/repos/scalvert/ember-test-helpers/pulls{/number}","milestones_url":"https://api.github.com/repos/scalvert/ember-test-helpers/milestones{/number}","notifications_url":"https://api.github.com/repos/scalvert/ember-test-helpers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scalvert/ember-test-helpers/labels{/name}","releases_url":"https://api.github.com/repos/scalvert/ember-test-helpers/releases{/id}","deployments_url":"https://api.github.com/repos/scalvert/ember-test-helpers/deployments","created_at":"2019-01-01T00:36:53Z","updated_at":"2019-10-18T20:49:16Z","pushed_at":"2019-10-21T21:15:36Z","git_url":"git://github.com/scalvert/ember-test-helpers.git","ssh_url":"git@github.com:scalvert/ember-test-helpers.git","clone_url":"https://github.com/scalvert/ember-test-helpers.git","svn_url":"https://github.com/scalvert/ember-test-helpers","homepage":"","size":4866,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"emberjs:master","ref":"master","sha":"4f98bd6e6da5f84b2608d36878a8c8d8732163ba","user":{"login":"emberjs","id":1253363,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNTMzNjM=","avatar_url":"https://avatars2.githubusercontent.com/u/1253363?v=4","gravatar_id":"","url":"https://api.github.com/users/emberjs","html_url":"https://github.com/emberjs","followers_url":"https://api.github.com/users/emberjs/followers","following_url":"https://api.github.com/users/emberjs/following{/other_user}","gists_url":"https://api.github.com/users/emberjs/gists{/gist_id}","starred_url":"https://api.github.com/users/emberjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emberjs/subscriptions","organizations_url":"https://api.github.com/users/emberjs/orgs","repos_url":"https://api.github.com/users/emberjs/repos","events_url":"https://api.github.com/users/emberjs/events{/privacy}","received_events_url":"https://api.github.com/users/emberjs/received_events","type":"Organization","site_admin":false},"repo":{"id":19406251,"node_id":"MDEwOlJlcG9zaXRvcnkxOTQwNjI1MQ==","name":"ember-test-helpers","full_name":"emberjs/ember-test-helpers","private":false,"owner":{"login":"emberjs","id":1253363,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNTMzNjM=","avatar_url":"https://avatars2.githubusercontent.com/u/1253363?v=4","gravatar_id":"","url":"https://api.github.com/users/emberjs","html_url":"https://github.com/emberjs","followers_url":"https://api.github.com/users/emberjs/followers","following_url":"https://api.github.com/users/emberjs/following{/other_user}","gists_url":"https://api.github.com/users/emberjs/gists{/gist_id}","starred_url":"https://api.github.com/users/emberjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emberjs/subscriptions","organizations_url":"https://api.github.com/users/emberjs/orgs","repos_url":"https://api.github.com/users/emberjs/repos","events_url":"https://api.github.com/users/emberjs/events{/privacy}","received_events_url":"https://api.github.com/users/emberjs/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/emberjs/ember-test-helpers","description":"Test-framework-agnostic helpers for testing Ember.js applications","fork":false,"url":"https://api.github.com/repos/emberjs/ember-test-helpers","forks_url":"https://api.github.com/repos/emberjs/ember-test-helpers/forks","keys_url":"https://api.github.com/repos/emberjs/ember-test-helpers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/emberjs/ember-test-helpers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/emberjs/ember-test-helpers/teams","hooks_url":"https://api.github.com/repos/emberjs/ember-test-helpers/hooks","issue_events_url":"https://api.github.com/repos/emberjs/ember-test-helpers/issues/events{/number}","events_url":"https://api.github.com/repos/emberjs/ember-test-helpers/events","assignees_url":"https://api.github.com/repos/emberjs/ember-test-helpers/assignees{/user}","branches_url":"https://api.github.com/repos/emberjs/ember-test-helpers/branches{/branch}","tags_url":"https://api.github.com/repos/emberjs/ember-test-helpers/tags","blobs_url":"https://api.github.com/repos/emberjs/ember-test-helpers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/emberjs/ember-test-helpers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/emberjs/ember-test-helpers/git/refs{/sha}","trees_url":"https://api.github.com/repos/emberjs/ember-test-helpers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/emberjs/ember-test-helpers/statuses/{sha}","languages_url":"https://api.github.com/repos/emberjs/ember-test-helpers/languages","stargazers_url":"https://api.github.com/repos/emberjs/ember-test-helpers/stargazers","contributors_url":"https://api.github.com/repos/emberjs/ember-test-helpers/contributors","subscribers_url":"https://api.github.com/repos/emberjs/ember-test-helpers/subscribers","subscription_url":"https://api.github.com/repos/emberjs/ember-test-helpers/subscription","commits_url":"https://api.github.com/repos/emberjs/ember-test-helpers/commits{/sha}","git_commits_url":"https://api.github.com/repos/emberjs/ember-test-helpers/git/commits{/sha}","comments_url":"https://api.github.com/repos/emberjs/ember-test-helpers/comments{/number}","issue_comment_url":"https://api.github.com/repos/emberjs/ember-test-helpers/issues/comments{/number}","contents_url":"https://api.github.com/repos/emberjs/ember-test-helpers/contents/{+path}","compare_url":"https://api.github.com/repos/emberjs/ember-test-helpers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/emberjs/ember-test-helpers/merges","archive_url":"https://api.github.com/repos/emberjs/ember-test-helpers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/emberjs/ember-test-helpers/downloads","issues_url":"https://api.github.com/repos/emberjs/ember-test-helpers/issues{/number}","pulls_url":"https://api.github.com/repos/emberjs/ember-test-helpers/pulls{/number}","milestones_url":"https://api.github.com/repos/emberjs/ember-test-helpers/milestones{/number}","notifications_url":"https://api.github.com/repos/emberjs/ember-test-helpers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/emberjs/ember-test-helpers/labels{/name}","releases_url":"https://api.github.com/repos/emberjs/ember-test-helpers/releases{/id}","deployments_url":"https://api.github.com/repos/emberjs/ember-test-helpers/deployments","created_at":"2014-05-03T15:44:27Z","updated_at":"2019-10-18T20:31:45Z","pushed_at":"2019-10-21T21:15:38Z","git_url":"git://github.com/emberjs/ember-test-helpers.git","ssh_url":"git@github.com:emberjs/ember-test-helpers.git","clone_url":"https://github.com/emberjs/ember-test-helpers.git","svn_url":"https://github.com/emberjs/ember-test-helpers","homepage":"","size":5045,"stargazers_count":135,"watchers_count":135,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":157,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":67,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":157,"open_issues":67,"watchers":135,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/emberjs/ember-test-helpers/pulls/724"},"html":{"href":"https://github.com/emberjs/ember-test-helpers/pull/724"},"issue":{"href":"https://api.github.com/repos/emberjs/ember-test-helpers/issues/724"},"comments":{"href":"https://api.github.com/repos/emberjs/ember-test-helpers/issues/724/comments"},"review_comments":{"href":"https://api.github.com/repos/emberjs/ember-test-helpers/pulls/724/comments"},"review_comment":{"href":"https://api.github.com/repos/emberjs/ember-test-helpers/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/emberjs/ember-test-helpers/pulls/724/commits"},"statuses":{"href":"https://api.github.com/repos/emberjs/ember-test-helpers/statuses/a32b4ec0a6c0d58eb5c0feb1f93845d79457f87d"}},"author_association":"CONTRIBUTOR"}}
other: {"actor":{"display_login":"rwjblue"}}