{"action":"created","comment":{"url":"https://api.github.com/repos/emberjs/ember.js/pulls/comments/58926352","id":58926352,"diff_hunk":"@@ -595,367 +66,14 @@ QUnit.test('moduleName is available on _renderNode when no layout is present', f\n     }\n   }));\n \n-  view = EmberView.extend({\n+  component = Component.extend({\n     [OWNER]: owner,\n     layout: compile('{{#sample-component}}Derp{{/sample-component}}', {\n       moduleName: templateModuleName\n     })\n   }).create();\n \n-  runAppend(view);\n-});\n-\n-QUnit.test('{{component}} helper works with positional params', function() {\n-  var SampleComponent = Component.extend();\n-  SampleComponent.reopenClass({\n-    positionalParams: ['name', 'age']\n-  });\n-\n-  owner.register('template:components/sample-component', compile('{{attrs.name}}{{attrs.age}}'));\n-  owner.register('component:sample-component', SampleComponent);\n-\n-  view = EmberView.extend({\n-    [OWNER]: owner,\n-    layout: compile('{{component \"sample-component\" myName myAge}}'),\n-    context: {\n-      myName: 'Quint',\n-      myAge: 4\n-    }\n-  }).create();\n-\n-  runAppend(view);\n-  equal(jQuery('#qunit-fixture').text(), 'Quint4');\n-  run(function() {\n-    set(view.context, 'myName', 'Edward');\n-    set(view.context, 'myAge', '5');\n-  });\n-\n-  equal(jQuery('#qunit-fixture').text(), 'Edward5');\n-});\n-\n-QUnit.test('yield to inverse', function() {\n-  owner.register('template:components/my-if', compile('{{#if predicate}}Yes:{{yield someValue}}{{else}}No:{{yield to=\"inverse\"}}{{/if}}'));\n-\n-  view = EmberView.extend({\n-    [OWNER]: owner,\n-    layout: compile('{{#my-if predicate=activated someValue=42 as |result|}}Hello{{result}}{{else}}Goodbye{{/my-if}}'),\n-    context: {\n-      activated: true\n-    }\n-  }).create();\n-\n-  runAppend(view);\n-  equal(jQuery('#qunit-fixture').text(), 'Yes:Hello42');\n-  run(function() {\n-    set(view.context, 'activated', false);\n-  });\n-\n-  equal(jQuery('#qunit-fixture').text(), 'No:Goodbye');\n-});\n-\n-QUnit.test('parameterized hasBlock inverse', function() {\n-  owner.register('template:components/check-inverse', compile('{{#if (hasBlock \"inverse\")}}Yes{{else}}No{{/if}}'));\n-\n-  view = EmberView.extend({\n-    [OWNER]: owner,\n-    layout: compile('{{#check-inverse id=\"expect-no\"}}{{/check-inverse}}  {{#check-inverse id=\"expect-yes\"}}{{else}}{{/check-inverse}}')\n-  }).create();\n-\n-  runAppend(view);\n-  equal(jQuery('#qunit-fixture #expect-no').text(), 'No');\n-  equal(jQuery('#qunit-fixture #expect-yes').text(), 'Yes');\n-});\n-\n-QUnit.test('parameterized hasBlock default', function() {\n-  owner.register('template:components/check-block', compile('{{#if (hasBlock)}}Yes{{else}}No{{/if}}'));\n-\n-  view = EmberView.extend({\n-    [OWNER]: owner,\n-    layout: compile('{{check-block id=\"expect-no\"}}  {{#check-block id=\"expect-yes\"}}{{/check-block}}')\n-  }).create();\n-\n-  runAppend(view);\n-  equal(jQuery('#qunit-fixture #expect-no').text(), 'No');\n-  equal(jQuery('#qunit-fixture #expect-yes').text(), 'Yes');\n-});\n-\n-QUnit.test('non-expression hasBlock ', function() {","path":"packages/ember-htmlbars/tests/integration/component_invocation_test.js","position":667,"original_position":667,"commit_id":"aadfd8eba4ebac1a3cf2c166a54ec7eb782e7bc7","original_commit_id":"aadfd8eba4ebac1a3cf2c166a54ec7eb782e7bc7","user":{"login":"chancancode","id":55829,"avatar_url":"https://avatars.githubusercontent.com/u/55829?v=3","gravatar_id":"","url":"https://api.github.com/users/chancancode","html_url":"https://github.com/chancancode","followers_url":"https://api.github.com/users/chancancode/followers","following_url":"https://api.github.com/users/chancancode/following{/other_user}","gists_url":"https://api.github.com/users/chancancode/gists{/gist_id}","starred_url":"https://api.github.com/users/chancancode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chancancode/subscriptions","organizations_url":"https://api.github.com/users/chancancode/orgs","repos_url":"https://api.github.com/users/chancancode/repos","events_url":"https://api.github.com/users/chancancode/events{/privacy}","received_events_url":"https://api.github.com/users/chancancode/received_events","type":"User","site_admin":false},"body":":heavy_check_mark: non-expression hasBlock","created_at":"2016-04-07T19:00:22Z","updated_at":"2016-04-07T19:00:22Z","html_url":"https://github.com/emberjs/ember.js/pull/12890#discussion_r58926352","pull_request_url":"https://api.github.com/repos/emberjs/ember.js/pulls/12890","_links":{"self":{"href":"https://api.github.com/repos/emberjs/ember.js/pulls/comments/58926352"},"html":{"href":"https://github.com/emberjs/ember.js/pull/12890#discussion_r58926352"},"pull_request":{"href":"https://api.github.com/repos/emberjs/ember.js/pulls/12890"}}},"pull_request":{"url":"https://api.github.com/repos/emberjs/ember.js/pulls/12890","id":57933194,"html_url":"https://github.com/emberjs/ember.js/pull/12890","diff_url":"https://github.com/emberjs/ember.js/pull/12890.diff","patch_url":"https://github.com/emberjs/ember.js/pull/12890.patch","issue_url":"https://api.github.com/repos/emberjs/ember.js/issues/12890","number":12890,"state":"open","locked":false,"title":"[Glimmer2] Component invocation tests","user":{"login":"Serabe","id":36221,"avatar_url":"https://avatars.githubusercontent.com/u/36221?v=3","gravatar_id":"","url":"https://api.github.com/users/Serabe","html_url":"https://github.com/Serabe","followers_url":"https://api.github.com/users/Serabe/followers","following_url":"https://api.github.com/users/Serabe/following{/other_user}","gists_url":"https://api.github.com/users/Serabe/gists{/gist_id}","starred_url":"https://api.github.com/users/Serabe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Serabe/subscriptions","organizations_url":"https://api.github.com/users/Serabe/orgs","repos_url":"https://api.github.com/users/Serabe/repos","events_url":"https://api.github.com/users/Serabe/events{/privacy}","received_events_url":"https://api.github.com/users/Serabe/received_events","type":"User","site_admin":false},"body":"This PR explores the use of Glimmer `RenderingTest` and `moduleFor`, by @chancancode and @wycats, for Ember testing. This was originally a duplicate effort with a similar DSL for test, though it used plain QUnit.\r\n\r\nFirst file to be _ported_ has been `component_invocation_test.js`, though we have only changed superficial methods and I'll go through the file again to use some of the assertions included in `RenderingTest`.\r\n\r\nA few comments on the experience:\r\n\r\n1. I would make `render()` and `rerender()` to be wrapped inside a `run` by default.\r\n2. I needed to change the behaviour of templates to be accepted compiled. A few tests depended on passing a given environment to the compiler.\r\n\r\nFor the `render()` and `rerender()` case, I think it is easier to read:\r\n\r\n```js\r\n// Test setup\r\n\r\nthis.render('{{my-component}}');\r\n\r\n// Some assertions\r\n```\r\n\r\nthan:\r\n\r\n```js\r\n// Test setup\r\n\r\nEmber.run(() => {\r\n  this.render('{{my-component}}');\r\n});\r\n\r\n// Some assertions\r\n```\r\n\r\nIf for any reason the test needed to render the component without being inside a `run`, `this.component.render()` would be enough.\r\n\r\nAnd just curious, why are all test names surrounded by `[]`, babel seems to be ok with just `'@test something'(){}`\r\n\r\nOld PR\r\n~~This PR adds a module to improve internal testing. The final purpose is to\r\navoid the use of `View`s for testing.~~\r\n\r\n~~This PR is in WIP until:~~\r\n- ~~A name for `moduleForApp` has been chosen.~~\r\n- ~~The API has been approved.~~\r\n\r\n~~The API has been created to avoid the need of using the internal variables (no more need to use `view` as the variable to make the `teardown` work).~~\r\n\r\n## ~~API~~\r\n\r\n### ~~`this.getOwner()`~~\r\n\r\n~~Returns the `owner` created for this test run.~~\r\n\r\n### ~~`this.register(fullName, factory, options)`~~\r\n\r\n~~Registers in the `owner` the `factory` with the name `fullName` and the given `options`. Returns the registered `factory`.~~\r\n\r\n### ~~`this.render(template, hash={})`~~\r\n\r\n~~Creates a new anonymous component with the `owner` for the tests and the given `template`. It instances said component with the passed `hash` and appends it to the view.~~\r\n\r\n~~Currently, `template` needs to be compiled previously.~~\r\n\r\n~~The instance is kept to be destroyed in the `teardown` process.~~\r\n\r\n~~It returns the component instance.~~\r\n\r\n~~Calling it more than once makes the test fails~~\r\n\r\n###~~ `this.rerender()`~~\r\n\r\n~~Same as `run(component, 'rerender')`, where component is the one `this.render` instantiated.~~\r\n\r\n### ~~`this.$()`~~\r\n\r\n~~Calls `$()` in the `component` created while using `this.render()`.~~","created_at":"2016-02-02T02:42:18Z","updated_at":"2016-04-07T19:00:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7fe3cfb7e3d219bb652a55f4ab8f97fd53c18a2e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/emberjs/ember.js/pulls/12890/commits","review_comments_url":"https://api.github.com/repos/emberjs/ember.js/pulls/12890/comments","review_comment_url":"https://api.github.com/repos/emberjs/ember.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/emberjs/ember.js/issues/12890/comments","statuses_url":"https://api.github.com/repos/emberjs/ember.js/statuses/aadfd8eba4ebac1a3cf2c166a54ec7eb782e7bc7","head":{"label":"Serabe:feature/improve-testing","ref":"feature/improve-testing","sha":"aadfd8eba4ebac1a3cf2c166a54ec7eb782e7bc7","user":{"login":"Serabe","id":36221,"avatar_url":"https://avatars.githubusercontent.com/u/36221?v=3","gravatar_id":"","url":"https://api.github.com/users/Serabe","html_url":"https://github.com/Serabe","followers_url":"https://api.github.com/users/Serabe/followers","following_url":"https://api.github.com/users/Serabe/following{/other_user}","gists_url":"https://api.github.com/users/Serabe/gists{/gist_id}","starred_url":"https://api.github.com/users/Serabe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Serabe/subscriptions","organizations_url":"https://api.github.com/users/Serabe/orgs","repos_url":"https://api.github.com/users/Serabe/repos","events_url":"https://api.github.com/users/Serabe/events{/privacy}","received_events_url":"https://api.github.com/users/Serabe/received_events","type":"User","site_admin":false},"repo":{"id":41854037,"name":"ember.js","full_name":"Serabe/ember.js","owner":{"login":"Serabe","id":36221,"avatar_url":"https://avatars.githubusercontent.com/u/36221?v=3","gravatar_id":"","url":"https://api.github.com/users/Serabe","html_url":"https://github.com/Serabe","followers_url":"https://api.github.com/users/Serabe/followers","following_url":"https://api.github.com/users/Serabe/following{/other_user}","gists_url":"https://api.github.com/users/Serabe/gists{/gist_id}","starred_url":"https://api.github.com/users/Serabe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Serabe/subscriptions","organizations_url":"https://api.github.com/users/Serabe/orgs","repos_url":"https://api.github.com/users/Serabe/repos","events_url":"https://api.github.com/users/Serabe/events{/privacy}","received_events_url":"https://api.github.com/users/Serabe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Serabe/ember.js","description":"Ember.js - A JavaScript framework for creating ambitious web applications","fork":true,"url":"https://api.github.com/repos/Serabe/ember.js","forks_url":"https://api.github.com/repos/Serabe/ember.js/forks","keys_url":"https://api.github.com/repos/Serabe/ember.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Serabe/ember.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Serabe/ember.js/teams","hooks_url":"https://api.github.com/repos/Serabe/ember.js/hooks","issue_events_url":"https://api.github.com/repos/Serabe/ember.js/issues/events{/number}","events_url":"https://api.github.com/repos/Serabe/ember.js/events","assignees_url":"https://api.github.com/repos/Serabe/ember.js/assignees{/user}","branches_url":"https://api.github.com/repos/Serabe/ember.js/branches{/branch}","tags_url":"https://api.github.com/repos/Serabe/ember.js/tags","blobs_url":"https://api.github.com/repos/Serabe/ember.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Serabe/ember.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Serabe/ember.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/Serabe/ember.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Serabe/ember.js/statuses/{sha}","languages_url":"https://api.github.com/repos/Serabe/ember.js/languages","stargazers_url":"https://api.github.com/repos/Serabe/ember.js/stargazers","contributors_url":"https://api.github.com/repos/Serabe/ember.js/contributors","subscribers_url":"https://api.github.com/repos/Serabe/ember.js/subscribers","subscription_url":"https://api.github.com/repos/Serabe/ember.js/subscription","commits_url":"https://api.github.com/repos/Serabe/ember.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/Serabe/ember.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/Serabe/ember.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/Serabe/ember.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/Serabe/ember.js/contents/{+path}","compare_url":"https://api.github.com/repos/Serabe/ember.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Serabe/ember.js/merges","archive_url":"https://api.github.com/repos/Serabe/ember.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Serabe/ember.js/downloads","issues_url":"https://api.github.com/repos/Serabe/ember.js/issues{/number}","pulls_url":"https://api.github.com/repos/Serabe/ember.js/pulls{/number}","milestones_url":"https://api.github.com/repos/Serabe/ember.js/milestones{/number}","notifications_url":"https://api.github.com/repos/Serabe/ember.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Serabe/ember.js/labels{/name}","releases_url":"https://api.github.com/repos/Serabe/ember.js/releases{/id}","deployments_url":"https://api.github.com/repos/Serabe/ember.js/deployments","created_at":"2015-09-03T10:28:32Z","updated_at":"2016-03-04T05:21:21Z","pushed_at":"2016-04-05T23:05:26Z","git_url":"git://github.com/Serabe/ember.js.git","ssh_url":"git@github.com:Serabe/ember.js.git","clone_url":"https://github.com/Serabe/ember.js.git","svn_url":"https://github.com/Serabe/ember.js","homepage":"http://www.emberjs.com","size":31851,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"emberjs:master","ref":"master","sha":"603d1d151169a36c515cfc0b62c4ecb75f41c716","user":{"login":"emberjs","id":1253363,"avatar_url":"https://avatars.githubusercontent.com/u/1253363?v=3","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":1801829,"name":"ember.js","full_name":"emberjs/ember.js","owner":{"login":"emberjs","id":1253363,"avatar_url":"https://avatars.githubusercontent.com/u/1253363?v=3","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},"private":false,"html_url":"https://github.com/emberjs/ember.js","description":"Ember.js - A JavaScript framework for creating ambitious web applications","fork":false,"url":"https://api.github.com/repos/emberjs/ember.js","forks_url":"https://api.github.com/repos/emberjs/ember.js/forks","keys_url":"https://api.github.com/repos/emberjs/ember.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/emberjs/ember.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/emberjs/ember.js/teams","hooks_url":"https://api.github.com/repos/emberjs/ember.js/hooks","issue_events_url":"https://api.github.com/repos/emberjs/ember.js/issues/events{/number}","events_url":"https://api.github.com/repos/emberjs/ember.js/events","assignees_url":"https://api.github.com/repos/emberjs/ember.js/assignees{/user}","branches_url":"https://api.github.com/repos/emberjs/ember.js/branches{/branch}","tags_url":"https://api.github.com/repos/emberjs/ember.js/tags","blobs_url":"https://api.github.com/repos/emberjs/ember.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/emberjs/ember.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/emberjs/ember.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/emberjs/ember.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/emberjs/ember.js/statuses/{sha}","languages_url":"https://api.github.com/repos/emberjs/ember.js/languages","stargazers_url":"https://api.github.com/repos/emberjs/ember.js/stargazers","contributors_url":"https://api.github.com/repos/emberjs/ember.js/contributors","subscribers_url":"https://api.github.com/repos/emberjs/ember.js/subscribers","subscription_url":"https://api.github.com/repos/emberjs/ember.js/subscription","commits_url":"https://api.github.com/repos/emberjs/ember.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/emberjs/ember.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/emberjs/ember.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/emberjs/ember.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/emberjs/ember.js/contents/{+path}","compare_url":"https://api.github.com/repos/emberjs/ember.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/emberjs/ember.js/merges","archive_url":"https://api.github.com/repos/emberjs/ember.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/emberjs/ember.js/downloads","issues_url":"https://api.github.com/repos/emberjs/ember.js/issues{/number}","pulls_url":"https://api.github.com/repos/emberjs/ember.js/pulls{/number}","milestones_url":"https://api.github.com/repos/emberjs/ember.js/milestones{/number}","notifications_url":"https://api.github.com/repos/emberjs/ember.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/emberjs/ember.js/labels{/name}","releases_url":"https://api.github.com/repos/emberjs/ember.js/releases{/id}","deployments_url":"https://api.github.com/repos/emberjs/ember.js/deployments","created_at":"2011-05-25T23:39:40Z","updated_at":"2016-04-07T18:33:16Z","pushed_at":"2016-04-07T17:02:09Z","git_url":"git://github.com/emberjs/ember.js.git","ssh_url":"git@github.com:emberjs/ember.js.git","clone_url":"https://github.com/emberjs/ember.js.git","svn_url":"https://github.com/emberjs/ember.js","homepage":"http://www.emberjs.com","size":66792,"stargazers_count":16034,"watchers_count":16034,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3446,"mirror_url":null,"open_issues_count":454,"forks":3446,"open_issues":454,"watchers":16034,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/emberjs/ember.js/pulls/12890"},"html":{"href":"https://github.com/emberjs/ember.js/pull/12890"},"issue":{"href":"https://api.github.com/repos/emberjs/ember.js/issues/12890"},"comments":{"href":"https://api.github.com/repos/emberjs/ember.js/issues/12890/comments"},"review_comments":{"href":"https://api.github.com/repos/emberjs/ember.js/pulls/12890/comments"},"review_comment":{"href":"https://api.github.com/repos/emberjs/ember.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/emberjs/ember.js/pulls/12890/commits"},"statuses":{"href":"https://api.github.com/repos/emberjs/ember.js/statuses/aadfd8eba4ebac1a3cf2c166a54ec7eb782e7bc7"}}}}