{"action":"created","comment":{"url":"https://api.github.com/repos/emberjs/ember.js/pulls/comments/53711694","id":53711694,"diff_hunk":"@@ -0,0 +1,144 @@\n+import { moduleFor } from '../../utils/test-case';\n+import { set } from 'ember-metal/property_set';\n+import EmberObject from 'ember-runtime/system/object';\n+import jQuery from 'ember-views/system/jquery';\n+\n+import {\n+  BASIC_TRUTHY_TESTS,\n+  BASIC_FALSY_TESTS,\n+  SharedHelperConditionalsTest\n+} from '../../utils/shared-conditional-tests';\n+\n+moduleFor('Helpers test: inline {{if}}', class extends SharedHelperConditionalsTest {\n+\n+  templateFor({ cond, truthy, falsy }) {\n+    return `{{if ${cond} ${truthy} ${falsy}}}`;\n+  }\n+\n+  ['@htmlbars it can omit the falsy argument']() {\n+    this.render(`{{if condition 'yes'}}`, { condition: true });\n+\n+    this.assertText('yes');\n+\n+    this.runTask(() => this.rerender());\n+\n+    this.assertText('yes');\n+\n+    this.runTask(() => set(this.context, 'condition', false));\n+\n+    this.assertText('');\n+\n+    this.runTask(() => set(this.context, 'condition', true));\n+\n+    this.assertText('yes');\n+  }\n+\n+  ['@test it can use falsy param as binding']() {\n+    this.render(`{{if condition truthy falsy}}`, { condition: false, truthy: 'yes', falsy: 'no' });\n+\n+    this.assertText('no');\n+\n+    this.runTask(() => this.rerender());\n+\n+    this.assertText('no');\n+\n+    this.runTask(() => set(this.context, 'falsy', 'NO!'));\n+\n+    this.assertText('NO!');\n+\n+    this.runTask(() => set(this.context, 'falsy', 'no'));\n+\n+    this.assertText('no');\n+  }\n+\n+  ['@test it respects isTruthy when object changes']() {\n+    this.render(`{{if condition 'truthy' 'falsy'}}`, { condition: EmberObject.create({ isTruthy: false }) });\n+\n+    this.assertText('falsy');\n+\n+    this.runTask(() => this.rerender());\n+\n+    this.assertText('falsy');\n+\n+    this.runTask(() => set(this.context, 'condition', EmberObject.create({ isTruthy: true })));\n+\n+    this.assertText('truthy');\n+\n+    this.runTask(() => set(this.context, 'condition', EmberObject.create({ isTruthy: false })));\n+\n+    this.assertText('falsy');\n+  }\n+\n+  ['@test it respects length test when list itself']() {\n+    this.render(`{{if condition 'truthy' 'falsy'}}`, { condition: [] });\n+\n+    this.assertText('falsy');\n+\n+    this.runTask(() => this.rerender());\n+\n+    this.assertText('falsy');\n+\n+    this.runTask(() => set(this.context, 'condition', [1]));","path":"packages/ember-glimmer/tests/integration/helpers/inline-if-test.js","position":null,"original_position":81,"commit_id":"1a6582905623e098aaa1b81dcea31fe31a7d11fd","original_commit_id":"e6c68387c5eed6e3b5d51e42a9cbced1c9a67881","user":{"login":"GavinJoyce","id":2526,"avatar_url":"https://avatars.githubusercontent.com/u/2526?v=3","gravatar_id":"","url":"https://api.github.com/users/GavinJoyce","html_url":"https://github.com/GavinJoyce","followers_url":"https://api.github.com/users/GavinJoyce/followers","following_url":"https://api.github.com/users/GavinJoyce/following{/other_user}","gists_url":"https://api.github.com/users/GavinJoyce/gists{/gist_id}","starred_url":"https://api.github.com/users/GavinJoyce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GavinJoyce/subscriptions","organizations_url":"https://api.github.com/users/GavinJoyce/orgs","repos_url":"https://api.github.com/users/GavinJoyce/repos","events_url":"https://api.github.com/users/GavinJoyce/events{/privacy}","received_events_url":"https://api.github.com/users/GavinJoyce/received_events","type":"User","site_admin":false},"body":":+1: ","created_at":"2016-02-22T23:23:50Z","updated_at":"2016-02-22T23:23:50Z","html_url":"https://github.com/emberjs/ember.js/pull/12920#discussion_r53711694","pull_request_url":"https://api.github.com/repos/emberjs/ember.js/pulls/12920","_links":{"self":{"href":"https://api.github.com/repos/emberjs/ember.js/pulls/comments/53711694"},"html":{"href":"https://github.com/emberjs/ember.js/pull/12920#discussion_r53711694"},"pull_request":{"href":"https://api.github.com/repos/emberjs/ember.js/pulls/12920"}}},"pull_request":{"url":"https://api.github.com/repos/emberjs/ember.js/pulls/12920","id":58534784,"html_url":"https://github.com/emberjs/ember.js/pull/12920","diff_url":"https://github.com/emberjs/ember.js/pull/12920.diff","patch_url":"https://github.com/emberjs/ember.js/pull/12920.patch","issue_url":"https://api.github.com/repos/emberjs/ember.js/issues/12920","number":12920,"state":"open","locked":false,"title":"[Glimmer2] inline if","user":{"login":"GavinJoyce","id":2526,"avatar_url":"https://avatars.githubusercontent.com/u/2526?v=3","gravatar_id":"","url":"https://api.github.com/users/GavinJoyce","html_url":"https://github.com/GavinJoyce","followers_url":"https://api.github.com/users/GavinJoyce/followers","following_url":"https://api.github.com/users/GavinJoyce/following{/other_user}","gists_url":"https://api.github.com/users/GavinJoyce/gists{/gist_id}","starred_url":"https://api.github.com/users/GavinJoyce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GavinJoyce/subscriptions","organizations_url":"https://api.github.com/users/GavinJoyce/orgs","repos_url":"https://api.github.com/users/GavinJoyce/repos","events_url":"https://api.github.com/users/GavinJoyce/events{/privacy}","received_events_url":"https://api.github.com/users/GavinJoyce/received_events","type":"User","site_admin":false},"body":"part of the [Glimmer Big-Picture Integration Checklist](https://github.com/emberjs/ember.js/issues/12907)\r\n\r\nTODO:\r\n\r\n * [x] additional tests\r\n   * [x] assertions\r\n   * [x] https://github.com/emberjs/ember.js/pull/12914#issuecomment-180194303\r\n     * [x] fixme: https://github.com/emberjs/ember.js/issues/12925 **note: we're not going to fix this, the tests are running and passing for `@glimmer` only**\r\n   * [x] `BASIC_TRUTHY_TESTS` & `BASIC_FALSY_TESTS `\r\n * [x] refactor `SharedConditionalsTest` so that it can be used by both block and inline helpers\r\n   * [x] extract specialized classes\r\n * [x] rebase after https://github.com/emberjs/ember.js/pull/12919 has landed\r\n * [x] rebase after master is :green_apple: https://github.com/emberjs/ember.js/pull/12919#issuecomment-181028742\r\n * [x] rebase after https://github.com/emberjs/ember.js/pull/12924\r\n * [x] docs\r\n * [x] add support for module `@glimmer` or `@htmlbars` prefixes\r\n * [x] figure out why these are failing: https://github.com/emberjs/ember.js/pull/12920#issuecomment-182658028 (**spoiler:** [jQuery caches](https://github.com/emberjs/ember.js/pull/12920#issuecomment-182908742 data attributes))\r\n * [x] remove htmlbars tests which are now covered in the new shared tests\r\n * [x] move remaining htmlbars inline if tests over to shared tests","created_at":"2016-02-07T00:30:30Z","updated_at":"2016-02-22T23:23:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6cd3a283fafd1c150c006aaaf07e652d9203fe91","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/emberjs/ember.js/pulls/12920/commits","review_comments_url":"https://api.github.com/repos/emberjs/ember.js/pulls/12920/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/12920/comments","statuses_url":"https://api.github.com/repos/emberjs/ember.js/statuses/1a6582905623e098aaa1b81dcea31fe31a7d11fd","head":{"label":"GavinJoyce:gj/glimmer-inline-if","ref":"gj/glimmer-inline-if","sha":"1a6582905623e098aaa1b81dcea31fe31a7d11fd","user":{"login":"GavinJoyce","id":2526,"avatar_url":"https://avatars.githubusercontent.com/u/2526?v=3","gravatar_id":"","url":"https://api.github.com/users/GavinJoyce","html_url":"https://github.com/GavinJoyce","followers_url":"https://api.github.com/users/GavinJoyce/followers","following_url":"https://api.github.com/users/GavinJoyce/following{/other_user}","gists_url":"https://api.github.com/users/GavinJoyce/gists{/gist_id}","starred_url":"https://api.github.com/users/GavinJoyce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GavinJoyce/subscriptions","organizations_url":"https://api.github.com/users/GavinJoyce/orgs","repos_url":"https://api.github.com/users/GavinJoyce/repos","events_url":"https://api.github.com/users/GavinJoyce/events{/privacy}","received_events_url":"https://api.github.com/users/GavinJoyce/received_events","type":"User","site_admin":false},"repo":{"id":50780854,"name":"ember.js","full_name":"GavinJoyce/ember.js","owner":{"login":"GavinJoyce","id":2526,"avatar_url":"https://avatars.githubusercontent.com/u/2526?v=3","gravatar_id":"","url":"https://api.github.com/users/GavinJoyce","html_url":"https://github.com/GavinJoyce","followers_url":"https://api.github.com/users/GavinJoyce/followers","following_url":"https://api.github.com/users/GavinJoyce/following{/other_user}","gists_url":"https://api.github.com/users/GavinJoyce/gists{/gist_id}","starred_url":"https://api.github.com/users/GavinJoyce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GavinJoyce/subscriptions","organizations_url":"https://api.github.com/users/GavinJoyce/orgs","repos_url":"https://api.github.com/users/GavinJoyce/repos","events_url":"https://api.github.com/users/GavinJoyce/events{/privacy}","received_events_url":"https://api.github.com/users/GavinJoyce/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/GavinJoyce/ember.js","description":"Ember.js - A JavaScript framework for creating ambitious web applications","fork":true,"url":"https://api.github.com/repos/GavinJoyce/ember.js","forks_url":"https://api.github.com/repos/GavinJoyce/ember.js/forks","keys_url":"https://api.github.com/repos/GavinJoyce/ember.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GavinJoyce/ember.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GavinJoyce/ember.js/teams","hooks_url":"https://api.github.com/repos/GavinJoyce/ember.js/hooks","issue_events_url":"https://api.github.com/repos/GavinJoyce/ember.js/issues/events{/number}","events_url":"https://api.github.com/repos/GavinJoyce/ember.js/events","assignees_url":"https://api.github.com/repos/GavinJoyce/ember.js/assignees{/user}","branches_url":"https://api.github.com/repos/GavinJoyce/ember.js/branches{/branch}","tags_url":"https://api.github.com/repos/GavinJoyce/ember.js/tags","blobs_url":"https://api.github.com/repos/GavinJoyce/ember.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GavinJoyce/ember.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GavinJoyce/ember.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/GavinJoyce/ember.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GavinJoyce/ember.js/statuses/{sha}","languages_url":"https://api.github.com/repos/GavinJoyce/ember.js/languages","stargazers_url":"https://api.github.com/repos/GavinJoyce/ember.js/stargazers","contributors_url":"https://api.github.com/repos/GavinJoyce/ember.js/contributors","subscribers_url":"https://api.github.com/repos/GavinJoyce/ember.js/subscribers","subscription_url":"https://api.github.com/repos/GavinJoyce/ember.js/subscription","commits_url":"https://api.github.com/repos/GavinJoyce/ember.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/GavinJoyce/ember.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/GavinJoyce/ember.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/GavinJoyce/ember.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/GavinJoyce/ember.js/contents/{+path}","compare_url":"https://api.github.com/repos/GavinJoyce/ember.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GavinJoyce/ember.js/merges","archive_url":"https://api.github.com/repos/GavinJoyce/ember.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GavinJoyce/ember.js/downloads","issues_url":"https://api.github.com/repos/GavinJoyce/ember.js/issues{/number}","pulls_url":"https://api.github.com/repos/GavinJoyce/ember.js/pulls{/number}","milestones_url":"https://api.github.com/repos/GavinJoyce/ember.js/milestones{/number}","notifications_url":"https://api.github.com/repos/GavinJoyce/ember.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GavinJoyce/ember.js/labels{/name}","releases_url":"https://api.github.com/repos/GavinJoyce/ember.js/releases{/id}","deployments_url":"https://api.github.com/repos/GavinJoyce/ember.js/deployments","created_at":"2016-01-31T15:27:27Z","updated_at":"2016-01-31T15:27:31Z","pushed_at":"2016-02-22T23:15:21Z","git_url":"git://github.com/GavinJoyce/ember.js.git","ssh_url":"git@github.com:GavinJoyce/ember.js.git","clone_url":"https://github.com/GavinJoyce/ember.js.git","svn_url":"https://github.com/GavinJoyce/ember.js","homepage":"http://www.emberjs.com","size":31518,"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":"4a404de21d70b780f2ac85b6fb265e037998d2d1","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-02-22T22:52:47Z","pushed_at":"2016-02-22T23:15:22Z","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":66579,"stargazers_count":15724,"watchers_count":15724,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3377,"mirror_url":null,"open_issues_count":398,"forks":3377,"open_issues":398,"watchers":15724,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/emberjs/ember.js/pulls/12920"},"html":{"href":"https://github.com/emberjs/ember.js/pull/12920"},"issue":{"href":"https://api.github.com/repos/emberjs/ember.js/issues/12920"},"comments":{"href":"https://api.github.com/repos/emberjs/ember.js/issues/12920/comments"},"review_comments":{"href":"https://api.github.com/repos/emberjs/ember.js/pulls/12920/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/12920/commits"},"statuses":{"href":"https://api.github.com/repos/emberjs/ember.js/statuses/1a6582905623e098aaa1b81dcea31fe31a7d11fd"}}}}