{"action":"created","comment":{"url":"https://api.github.com/repos/airbnb/enzyme/pulls/comments/238846336","pull_request_review_id":181488150,"id":238846336,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzODg0NjMzNg==","diff_hunk":"@@ -320,3 +320,49 @@ export function spyMethod(instance, methodName) {\n     },\n   };\n }\n+\n+export function validEmptyValues(renderedValue) {\n+  return renderedValue === null || renderedValue === false;\n+}\n+\n+export function renderedDive(nodes) {\n+  let isEmptyRender = true;\n+  const renderedKey = 'rendered';\n+\n+  function dive(renderedNodes) {\n+    const isList = renderedNodes && renderedNodes.length > 0 && Array.isArray(renderedNodes);\n+    if (isList) {\n+      return renderedNodes.some((n) => {\n+        if (n) {\n+          if ((has(n, renderedKey))) {\n+            dive(n.rendered);\n+          } else if (!validEmptyValues(n.rendered)) {\n+            isEmptyRender = false;\n+          }\n+        } else if (!validEmptyValues(n)) {\n+          isEmptyRender = false;\n+        }\n+\n+        return !isEmptyRender;\n+      });\n+    }\n+\n+    if (!validEmptyValues(renderedNodes)) {\n+      if (has(renderedNodes, renderedKey)) {\n+        dive(renderedNodes.rendered);\n+      } else if (has(renderedNodes, renderedKey) && !validEmptyValues(renderedNodes.rendered)) {\n+        isEmptyRender = false;\n+      } else if (!has(renderedNodes, renderedKey) && !validEmptyValues(renderedNodes)) {\n+        isEmptyRender = false;\n+      } else {\n+        dive(renderedNodes.rendered);\n+      }\n+    }\n+\n+    return isEmptyRender;\n+  }\n+\n+  dive(nodes);","path":"packages/enzyme/src/Utils.js","position":46,"original_position":46,"commit_id":"9d2ec9b6072ed86989cbb668e16733847b002856","original_commit_id":"9d2ec9b6072ed86989cbb668e16733847b002856","user":{"login":"ljharb","id":45469,"node_id":"MDQ6VXNlcjQ1NDY5","avatar_url":"https://avatars1.githubusercontent.com/u/45469?v=4","gravatar_id":"","url":"https://api.github.com/users/ljharb","html_url":"https://github.com/ljharb","followers_url":"https://api.github.com/users/ljharb/followers","following_url":"https://api.github.com/users/ljharb/following{/other_user}","gists_url":"https://api.github.com/users/ljharb/gists{/gist_id}","starred_url":"https://api.github.com/users/ljharb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ljharb/subscriptions","organizations_url":"https://api.github.com/users/ljharb/orgs","repos_url":"https://api.github.com/users/ljharb/repos","events_url":"https://api.github.com/users/ljharb/events{/privacy}","received_events_url":"https://api.github.com/users/ljharb/received_events","type":"User","site_admin":false},"body":"could this not be `return dive(nodes)`?","created_at":"2018-12-04T21:30:47Z","updated_at":"2018-12-04T21:30:57Z","html_url":"https://github.com/airbnb/enzyme/pull/1924#discussion_r238846336","pull_request_url":"https://api.github.com/repos/airbnb/enzyme/pulls/1924","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/airbnb/enzyme/pulls/comments/238846336"},"html":{"href":"https://github.com/airbnb/enzyme/pull/1924#discussion_r238846336"},"pull_request":{"href":"https://api.github.com/repos/airbnb/enzyme/pulls/1924"}}},"pull_request":{"url":"https://api.github.com/repos/airbnb/enzyme/pulls/1924","id":235882489,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM1ODgyNDg5","html_url":"https://github.com/airbnb/enzyme/pull/1924","diff_url":"https://github.com/airbnb/enzyme/pull/1924.diff","patch_url":"https://github.com/airbnb/enzyme/pull/1924.patch","issue_url":"https://api.github.com/repos/airbnb/enzyme/issues/1924","number":1924,"state":"open","locked":false,"title":"Update: Adds recursive check for isEmptyRender","user":{"login":"sstern6","id":10355544,"node_id":"MDQ6VXNlcjEwMzU1NTQ0","avatar_url":"https://avatars2.githubusercontent.com/u/10355544?v=4","gravatar_id":"","url":"https://api.github.com/users/sstern6","html_url":"https://github.com/sstern6","followers_url":"https://api.github.com/users/sstern6/followers","following_url":"https://api.github.com/users/sstern6/following{/other_user}","gists_url":"https://api.github.com/users/sstern6/gists{/gist_id}","starred_url":"https://api.github.com/users/sstern6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sstern6/subscriptions","organizations_url":"https://api.github.com/users/sstern6/orgs","repos_url":"https://api.github.com/users/sstern6/repos","events_url":"https://api.github.com/users/sstern6/events{/privacy}","received_events_url":"https://api.github.com/users/sstern6/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-12-04T16:50:15Z","updated_at":"2018-12-04T21:30:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/airbnb/enzyme/pulls/1924/commits","review_comments_url":"https://api.github.com/repos/airbnb/enzyme/pulls/1924/comments","review_comment_url":"https://api.github.com/repos/airbnb/enzyme/pulls/comments{/number}","comments_url":"https://api.github.com/repos/airbnb/enzyme/issues/1924/comments","statuses_url":"https://api.github.com/repos/airbnb/enzyme/statuses/9d2ec9b6072ed86989cbb668e16733847b002856","head":{"label":"sstern6:issue-1866","ref":"issue-1866","sha":"9d2ec9b6072ed86989cbb668e16733847b002856","user":{"login":"sstern6","id":10355544,"node_id":"MDQ6VXNlcjEwMzU1NTQ0","avatar_url":"https://avatars2.githubusercontent.com/u/10355544?v=4","gravatar_id":"","url":"https://api.github.com/users/sstern6","html_url":"https://github.com/sstern6","followers_url":"https://api.github.com/users/sstern6/followers","following_url":"https://api.github.com/users/sstern6/following{/other_user}","gists_url":"https://api.github.com/users/sstern6/gists{/gist_id}","starred_url":"https://api.github.com/users/sstern6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sstern6/subscriptions","organizations_url":"https://api.github.com/users/sstern6/orgs","repos_url":"https://api.github.com/users/sstern6/repos","events_url":"https://api.github.com/users/sstern6/events{/privacy}","received_events_url":"https://api.github.com/users/sstern6/received_events","type":"User","site_admin":false},"repo":{"id":154778388,"node_id":"MDEwOlJlcG9zaXRvcnkxNTQ3NzgzODg=","name":"enzyme","full_name":"sstern6/enzyme","private":false,"owner":{"login":"sstern6","id":10355544,"node_id":"MDQ6VXNlcjEwMzU1NTQ0","avatar_url":"https://avatars2.githubusercontent.com/u/10355544?v=4","gravatar_id":"","url":"https://api.github.com/users/sstern6","html_url":"https://github.com/sstern6","followers_url":"https://api.github.com/users/sstern6/followers","following_url":"https://api.github.com/users/sstern6/following{/other_user}","gists_url":"https://api.github.com/users/sstern6/gists{/gist_id}","starred_url":"https://api.github.com/users/sstern6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sstern6/subscriptions","organizations_url":"https://api.github.com/users/sstern6/orgs","repos_url":"https://api.github.com/users/sstern6/repos","events_url":"https://api.github.com/users/sstern6/events{/privacy}","received_events_url":"https://api.github.com/users/sstern6/received_events","type":"User","site_admin":false},"html_url":"https://github.com/sstern6/enzyme","description":"JavaScript Testing utilities for React","fork":true,"url":"https://api.github.com/repos/sstern6/enzyme","forks_url":"https://api.github.com/repos/sstern6/enzyme/forks","keys_url":"https://api.github.com/repos/sstern6/enzyme/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sstern6/enzyme/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sstern6/enzyme/teams","hooks_url":"https://api.github.com/repos/sstern6/enzyme/hooks","issue_events_url":"https://api.github.com/repos/sstern6/enzyme/issues/events{/number}","events_url":"https://api.github.com/repos/sstern6/enzyme/events","assignees_url":"https://api.github.com/repos/sstern6/enzyme/assignees{/user}","branches_url":"https://api.github.com/repos/sstern6/enzyme/branches{/branch}","tags_url":"https://api.github.com/repos/sstern6/enzyme/tags","blobs_url":"https://api.github.com/repos/sstern6/enzyme/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sstern6/enzyme/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sstern6/enzyme/git/refs{/sha}","trees_url":"https://api.github.com/repos/sstern6/enzyme/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sstern6/enzyme/statuses/{sha}","languages_url":"https://api.github.com/repos/sstern6/enzyme/languages","stargazers_url":"https://api.github.com/repos/sstern6/enzyme/stargazers","contributors_url":"https://api.github.com/repos/sstern6/enzyme/contributors","subscribers_url":"https://api.github.com/repos/sstern6/enzyme/subscribers","subscription_url":"https://api.github.com/repos/sstern6/enzyme/subscription","commits_url":"https://api.github.com/repos/sstern6/enzyme/commits{/sha}","git_commits_url":"https://api.github.com/repos/sstern6/enzyme/git/commits{/sha}","comments_url":"https://api.github.com/repos/sstern6/enzyme/comments{/number}","issue_comment_url":"https://api.github.com/repos/sstern6/enzyme/issues/comments{/number}","contents_url":"https://api.github.com/repos/sstern6/enzyme/contents/{+path}","compare_url":"https://api.github.com/repos/sstern6/enzyme/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sstern6/enzyme/merges","archive_url":"https://api.github.com/repos/sstern6/enzyme/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sstern6/enzyme/downloads","issues_url":"https://api.github.com/repos/sstern6/enzyme/issues{/number}","pulls_url":"https://api.github.com/repos/sstern6/enzyme/pulls{/number}","milestones_url":"https://api.github.com/repos/sstern6/enzyme/milestones{/number}","notifications_url":"https://api.github.com/repos/sstern6/enzyme/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sstern6/enzyme/labels{/name}","releases_url":"https://api.github.com/repos/sstern6/enzyme/releases{/id}","deployments_url":"https://api.github.com/repos/sstern6/enzyme/deployments","created_at":"2018-10-26T04:43:47Z","updated_at":"2018-11-09T02:55:18Z","pushed_at":"2018-12-04T16:49:12Z","git_url":"git://github.com/sstern6/enzyme.git","ssh_url":"git@github.com:sstern6/enzyme.git","clone_url":"https://github.com/sstern6/enzyme.git","svn_url":"https://github.com/sstern6/enzyme","homepage":"https://airbnb.io/enzyme/","size":5100,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"airbnb:master","ref":"master","sha":"66ccd862afd083110103855f375b40d295e65e3c","user":{"login":"airbnb","id":698437,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5ODQzNw==","avatar_url":"https://avatars3.githubusercontent.com/u/698437?v=4","gravatar_id":"","url":"https://api.github.com/users/airbnb","html_url":"https://github.com/airbnb","followers_url":"https://api.github.com/users/airbnb/followers","following_url":"https://api.github.com/users/airbnb/following{/other_user}","gists_url":"https://api.github.com/users/airbnb/gists{/gist_id}","starred_url":"https://api.github.com/users/airbnb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/airbnb/subscriptions","organizations_url":"https://api.github.com/users/airbnb/orgs","repos_url":"https://api.github.com/users/airbnb/repos","events_url":"https://api.github.com/users/airbnb/events{/privacy}","received_events_url":"https://api.github.com/users/airbnb/received_events","type":"Organization","site_admin":false},"repo":{"id":45942274,"node_id":"MDEwOlJlcG9zaXRvcnk0NTk0MjI3NA==","name":"enzyme","full_name":"airbnb/enzyme","private":false,"owner":{"login":"airbnb","id":698437,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5ODQzNw==","avatar_url":"https://avatars3.githubusercontent.com/u/698437?v=4","gravatar_id":"","url":"https://api.github.com/users/airbnb","html_url":"https://github.com/airbnb","followers_url":"https://api.github.com/users/airbnb/followers","following_url":"https://api.github.com/users/airbnb/following{/other_user}","gists_url":"https://api.github.com/users/airbnb/gists{/gist_id}","starred_url":"https://api.github.com/users/airbnb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/airbnb/subscriptions","organizations_url":"https://api.github.com/users/airbnb/orgs","repos_url":"https://api.github.com/users/airbnb/repos","events_url":"https://api.github.com/users/airbnb/events{/privacy}","received_events_url":"https://api.github.com/users/airbnb/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/airbnb/enzyme","description":"JavaScript Testing utilities for React","fork":false,"url":"https://api.github.com/repos/airbnb/enzyme","forks_url":"https://api.github.com/repos/airbnb/enzyme/forks","keys_url":"https://api.github.com/repos/airbnb/enzyme/keys{/key_id}","collaborators_url":"https://api.github.com/repos/airbnb/enzyme/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/airbnb/enzyme/teams","hooks_url":"https://api.github.com/repos/airbnb/enzyme/hooks","issue_events_url":"https://api.github.com/repos/airbnb/enzyme/issues/events{/number}","events_url":"https://api.github.com/repos/airbnb/enzyme/events","assignees_url":"https://api.github.com/repos/airbnb/enzyme/assignees{/user}","branches_url":"https://api.github.com/repos/airbnb/enzyme/branches{/branch}","tags_url":"https://api.github.com/repos/airbnb/enzyme/tags","blobs_url":"https://api.github.com/repos/airbnb/enzyme/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/airbnb/enzyme/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/airbnb/enzyme/git/refs{/sha}","trees_url":"https://api.github.com/repos/airbnb/enzyme/git/trees{/sha}","statuses_url":"https://api.github.com/repos/airbnb/enzyme/statuses/{sha}","languages_url":"https://api.github.com/repos/airbnb/enzyme/languages","stargazers_url":"https://api.github.com/repos/airbnb/enzyme/stargazers","contributors_url":"https://api.github.com/repos/airbnb/enzyme/contributors","subscribers_url":"https://api.github.com/repos/airbnb/enzyme/subscribers","subscription_url":"https://api.github.com/repos/airbnb/enzyme/subscription","commits_url":"https://api.github.com/repos/airbnb/enzyme/commits{/sha}","git_commits_url":"https://api.github.com/repos/airbnb/enzyme/git/commits{/sha}","comments_url":"https://api.github.com/repos/airbnb/enzyme/comments{/number}","issue_comment_url":"https://api.github.com/repos/airbnb/enzyme/issues/comments{/number}","contents_url":"https://api.github.com/repos/airbnb/enzyme/contents/{+path}","compare_url":"https://api.github.com/repos/airbnb/enzyme/compare/{base}...{head}","merges_url":"https://api.github.com/repos/airbnb/enzyme/merges","archive_url":"https://api.github.com/repos/airbnb/enzyme/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/airbnb/enzyme/downloads","issues_url":"https://api.github.com/repos/airbnb/enzyme/issues{/number}","pulls_url":"https://api.github.com/repos/airbnb/enzyme/pulls{/number}","milestones_url":"https://api.github.com/repos/airbnb/enzyme/milestones{/number}","notifications_url":"https://api.github.com/repos/airbnb/enzyme/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/airbnb/enzyme/labels{/name}","releases_url":"https://api.github.com/repos/airbnb/enzyme/releases{/id}","deployments_url":"https://api.github.com/repos/airbnb/enzyme/deployments","created_at":"2015-11-10T21:45:38Z","updated_at":"2018-12-04T18:27:15Z","pushed_at":"2018-12-04T16:50:16Z","git_url":"git://github.com/airbnb/enzyme.git","ssh_url":"git@github.com:airbnb/enzyme.git","clone_url":"https://github.com/airbnb/enzyme.git","svn_url":"https://github.com/airbnb/enzyme","homepage":"https://airbnb.io/enzyme/","size":5570,"stargazers_count":15921,"watchers_count":15921,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":1724,"mirror_url":null,"archived":false,"open_issues_count":150,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1724,"open_issues":150,"watchers":15921,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/airbnb/enzyme/pulls/1924"},"html":{"href":"https://github.com/airbnb/enzyme/pull/1924"},"issue":{"href":"https://api.github.com/repos/airbnb/enzyme/issues/1924"},"comments":{"href":"https://api.github.com/repos/airbnb/enzyme/issues/1924/comments"},"review_comments":{"href":"https://api.github.com/repos/airbnb/enzyme/pulls/1924/comments"},"review_comment":{"href":"https://api.github.com/repos/airbnb/enzyme/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/airbnb/enzyme/pulls/1924/commits"},"statuses":{"href":"https://api.github.com/repos/airbnb/enzyme/statuses/9d2ec9b6072ed86989cbb668e16733847b002856"}},"author_association":"NONE"}}
{"actor":{"display_login":"ljharb"}}