{"action":"created","comment":{"url":"https://api.github.com/repos/mjackson/expect/pulls/comments/61456491","id":61456491,"diff_hunk":"@@ -401,6 +401,12 @@ class Expectation {\n       typeof this.actual\n     )\n \n+    assert(\n+      isArray(keys),\n+      'The \"keys\" argument in expect(actual).toIncludeKeys(keys) must be an array, not %s',\n+      typeof keys","path":"modules/Expectation.js","position":7,"original_position":7,"commit_id":"f81e4486a223322ca8e58304e2177de9f0acd4c3","original_commit_id":"f81e4486a223322ca8e58304e2177de9f0acd4c3","user":{"login":"ljharb","id":45469,"avatar_url":"https://avatars.githubusercontent.com/u/45469?v=3","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":"i don't think `typeof` will be helpful here - this will report \"object\" for null as well. can we use `object-inspect` here instead?","created_at":"2016-04-28T16:13:56Z","updated_at":"2016-04-28T16:13:56Z","html_url":"https://github.com/mjackson/expect/pull/94#discussion_r61456491","pull_request_url":"https://api.github.com/repos/mjackson/expect/pulls/94","_links":{"self":{"href":"https://api.github.com/repos/mjackson/expect/pulls/comments/61456491"},"html":{"href":"https://github.com/mjackson/expect/pull/94#discussion_r61456491"},"pull_request":{"href":"https://api.github.com/repos/mjackson/expect/pulls/94"}}},"pull_request":{"url":"https://api.github.com/repos/mjackson/expect/pulls/94","id":68224063,"html_url":"https://github.com/mjackson/expect/pull/94","diff_url":"https://github.com/mjackson/expect/pull/94.diff","patch_url":"https://github.com/mjackson/expect/pull/94.patch","issue_url":"https://api.github.com/repos/mjackson/expect/issues/94","number":94,"state":"open","locked":false,"title":"Handle non-array keys in toIncludeKeys","user":{"login":"wuct","id":1695958,"avatar_url":"https://avatars.githubusercontent.com/u/1695958?v=3","gravatar_id":"","url":"https://api.github.com/users/wuct","html_url":"https://github.com/wuct","followers_url":"https://api.github.com/users/wuct/followers","following_url":"https://api.github.com/users/wuct/following{/other_user}","gists_url":"https://api.github.com/users/wuct/gists{/gist_id}","starred_url":"https://api.github.com/users/wuct/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wuct/subscriptions","organizations_url":"https://api.github.com/users/wuct/orgs","repos_url":"https://api.github.com/users/wuct/repos","events_url":"https://api.github.com/users/wuct/events{/privacy}","received_events_url":"https://api.github.com/users/wuct/received_events","type":"User","site_admin":false},"body":"Throw a better error message when `toIncludeKeys` is invoked with a non-array `keys`.\r\n\r\nBefore:\r\n\r\n```\r\nTypeError: keys.every is not a function\r\n```\r\n\r\nAfter:\r\n\r\n```\r\nError: The \"keys\" argument in expect(actual).toIncludeKeys(keys) must be an array, not 'object'\r\n```\r\n","created_at":"2016-04-28T13:53:46Z","updated_at":"2016-04-28T16:13:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9395bb296678546fb6260a1c82e79df022a8dee6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mjackson/expect/pulls/94/commits","review_comments_url":"https://api.github.com/repos/mjackson/expect/pulls/94/comments","review_comment_url":"https://api.github.com/repos/mjackson/expect/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mjackson/expect/issues/94/comments","statuses_url":"https://api.github.com/repos/mjackson/expect/statuses/f81e4486a223322ca8e58304e2177de9f0acd4c3","head":{"label":"wuct:toIncludeKeys","ref":"toIncludeKeys","sha":"f81e4486a223322ca8e58304e2177de9f0acd4c3","user":{"login":"wuct","id":1695958,"avatar_url":"https://avatars.githubusercontent.com/u/1695958?v=3","gravatar_id":"","url":"https://api.github.com/users/wuct","html_url":"https://github.com/wuct","followers_url":"https://api.github.com/users/wuct/followers","following_url":"https://api.github.com/users/wuct/following{/other_user}","gists_url":"https://api.github.com/users/wuct/gists{/gist_id}","starred_url":"https://api.github.com/users/wuct/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wuct/subscriptions","organizations_url":"https://api.github.com/users/wuct/orgs","repos_url":"https://api.github.com/users/wuct/repos","events_url":"https://api.github.com/users/wuct/events{/privacy}","received_events_url":"https://api.github.com/users/wuct/received_events","type":"User","site_admin":false},"repo":{"id":54879527,"name":"expect","full_name":"wuct/expect","owner":{"login":"wuct","id":1695958,"avatar_url":"https://avatars.githubusercontent.com/u/1695958?v=3","gravatar_id":"","url":"https://api.github.com/users/wuct","html_url":"https://github.com/wuct","followers_url":"https://api.github.com/users/wuct/followers","following_url":"https://api.github.com/users/wuct/following{/other_user}","gists_url":"https://api.github.com/users/wuct/gists{/gist_id}","starred_url":"https://api.github.com/users/wuct/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wuct/subscriptions","organizations_url":"https://api.github.com/users/wuct/orgs","repos_url":"https://api.github.com/users/wuct/repos","events_url":"https://api.github.com/users/wuct/events{/privacy}","received_events_url":"https://api.github.com/users/wuct/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wuct/expect","description":"Write better assertions","fork":true,"url":"https://api.github.com/repos/wuct/expect","forks_url":"https://api.github.com/repos/wuct/expect/forks","keys_url":"https://api.github.com/repos/wuct/expect/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wuct/expect/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wuct/expect/teams","hooks_url":"https://api.github.com/repos/wuct/expect/hooks","issue_events_url":"https://api.github.com/repos/wuct/expect/issues/events{/number}","events_url":"https://api.github.com/repos/wuct/expect/events","assignees_url":"https://api.github.com/repos/wuct/expect/assignees{/user}","branches_url":"https://api.github.com/repos/wuct/expect/branches{/branch}","tags_url":"https://api.github.com/repos/wuct/expect/tags","blobs_url":"https://api.github.com/repos/wuct/expect/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wuct/expect/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wuct/expect/git/refs{/sha}","trees_url":"https://api.github.com/repos/wuct/expect/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wuct/expect/statuses/{sha}","languages_url":"https://api.github.com/repos/wuct/expect/languages","stargazers_url":"https://api.github.com/repos/wuct/expect/stargazers","contributors_url":"https://api.github.com/repos/wuct/expect/contributors","subscribers_url":"https://api.github.com/repos/wuct/expect/subscribers","subscription_url":"https://api.github.com/repos/wuct/expect/subscription","commits_url":"https://api.github.com/repos/wuct/expect/commits{/sha}","git_commits_url":"https://api.github.com/repos/wuct/expect/git/commits{/sha}","comments_url":"https://api.github.com/repos/wuct/expect/comments{/number}","issue_comment_url":"https://api.github.com/repos/wuct/expect/issues/comments{/number}","contents_url":"https://api.github.com/repos/wuct/expect/contents/{+path}","compare_url":"https://api.github.com/repos/wuct/expect/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wuct/expect/merges","archive_url":"https://api.github.com/repos/wuct/expect/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wuct/expect/downloads","issues_url":"https://api.github.com/repos/wuct/expect/issues{/number}","pulls_url":"https://api.github.com/repos/wuct/expect/pulls{/number}","milestones_url":"https://api.github.com/repos/wuct/expect/milestones{/number}","notifications_url":"https://api.github.com/repos/wuct/expect/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wuct/expect/labels{/name}","releases_url":"https://api.github.com/repos/wuct/expect/releases{/id}","deployments_url":"https://api.github.com/repos/wuct/expect/deployments","created_at":"2016-03-28T08:51:36Z","updated_at":"2016-03-28T08:51:37Z","pushed_at":"2016-04-28T13:49:07Z","git_url":"git://github.com/wuct/expect.git","ssh_url":"git@github.com:wuct/expect.git","clone_url":"https://github.com/wuct/expect.git","svn_url":"https://github.com/wuct/expect","homepage":"","size":245,"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":"mjackson:master","ref":"master","sha":"ef4aa9001672521613d5f585c4ec7453d8d0d936","user":{"login":"mjackson","id":92839,"avatar_url":"https://avatars.githubusercontent.com/u/92839?v=3","gravatar_id":"","url":"https://api.github.com/users/mjackson","html_url":"https://github.com/mjackson","followers_url":"https://api.github.com/users/mjackson/followers","following_url":"https://api.github.com/users/mjackson/following{/other_user}","gists_url":"https://api.github.com/users/mjackson/gists{/gist_id}","starred_url":"https://api.github.com/users/mjackson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjackson/subscriptions","organizations_url":"https://api.github.com/users/mjackson/orgs","repos_url":"https://api.github.com/users/mjackson/repos","events_url":"https://api.github.com/users/mjackson/events{/privacy}","received_events_url":"https://api.github.com/users/mjackson/received_events","type":"User","site_admin":false},"repo":{"id":17575045,"name":"expect","full_name":"mjackson/expect","owner":{"login":"mjackson","id":92839,"avatar_url":"https://avatars.githubusercontent.com/u/92839?v=3","gravatar_id":"","url":"https://api.github.com/users/mjackson","html_url":"https://github.com/mjackson","followers_url":"https://api.github.com/users/mjackson/followers","following_url":"https://api.github.com/users/mjackson/following{/other_user}","gists_url":"https://api.github.com/users/mjackson/gists{/gist_id}","starred_url":"https://api.github.com/users/mjackson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjackson/subscriptions","organizations_url":"https://api.github.com/users/mjackson/orgs","repos_url":"https://api.github.com/users/mjackson/repos","events_url":"https://api.github.com/users/mjackson/events{/privacy}","received_events_url":"https://api.github.com/users/mjackson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mjackson/expect","description":"Write better assertions","fork":false,"url":"https://api.github.com/repos/mjackson/expect","forks_url":"https://api.github.com/repos/mjackson/expect/forks","keys_url":"https://api.github.com/repos/mjackson/expect/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mjackson/expect/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mjackson/expect/teams","hooks_url":"https://api.github.com/repos/mjackson/expect/hooks","issue_events_url":"https://api.github.com/repos/mjackson/expect/issues/events{/number}","events_url":"https://api.github.com/repos/mjackson/expect/events","assignees_url":"https://api.github.com/repos/mjackson/expect/assignees{/user}","branches_url":"https://api.github.com/repos/mjackson/expect/branches{/branch}","tags_url":"https://api.github.com/repos/mjackson/expect/tags","blobs_url":"https://api.github.com/repos/mjackson/expect/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mjackson/expect/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mjackson/expect/git/refs{/sha}","trees_url":"https://api.github.com/repos/mjackson/expect/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mjackson/expect/statuses/{sha}","languages_url":"https://api.github.com/repos/mjackson/expect/languages","stargazers_url":"https://api.github.com/repos/mjackson/expect/stargazers","contributors_url":"https://api.github.com/repos/mjackson/expect/contributors","subscribers_url":"https://api.github.com/repos/mjackson/expect/subscribers","subscription_url":"https://api.github.com/repos/mjackson/expect/subscription","commits_url":"https://api.github.com/repos/mjackson/expect/commits{/sha}","git_commits_url":"https://api.github.com/repos/mjackson/expect/git/commits{/sha}","comments_url":"https://api.github.com/repos/mjackson/expect/comments{/number}","issue_comment_url":"https://api.github.com/repos/mjackson/expect/issues/comments{/number}","contents_url":"https://api.github.com/repos/mjackson/expect/contents/{+path}","compare_url":"https://api.github.com/repos/mjackson/expect/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mjackson/expect/merges","archive_url":"https://api.github.com/repos/mjackson/expect/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mjackson/expect/downloads","issues_url":"https://api.github.com/repos/mjackson/expect/issues{/number}","pulls_url":"https://api.github.com/repos/mjackson/expect/pulls{/number}","milestones_url":"https://api.github.com/repos/mjackson/expect/milestones{/number}","notifications_url":"https://api.github.com/repos/mjackson/expect/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mjackson/expect/labels{/name}","releases_url":"https://api.github.com/repos/mjackson/expect/releases{/id}","deployments_url":"https://api.github.com/repos/mjackson/expect/deployments","created_at":"2014-03-09T22:14:21Z","updated_at":"2016-04-28T13:59:50Z","pushed_at":"2016-04-28T13:53:46Z","git_url":"git://github.com/mjackson/expect.git","ssh_url":"git@github.com:mjackson/expect.git","clone_url":"https://github.com/mjackson/expect.git","svn_url":"https://github.com/mjackson/expect","homepage":"","size":317,"stargazers_count":638,"watchers_count":638,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":44,"mirror_url":null,"open_issues_count":8,"forks":44,"open_issues":8,"watchers":638,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mjackson/expect/pulls/94"},"html":{"href":"https://github.com/mjackson/expect/pull/94"},"issue":{"href":"https://api.github.com/repos/mjackson/expect/issues/94"},"comments":{"href":"https://api.github.com/repos/mjackson/expect/issues/94/comments"},"review_comments":{"href":"https://api.github.com/repos/mjackson/expect/pulls/94/comments"},"review_comment":{"href":"https://api.github.com/repos/mjackson/expect/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mjackson/expect/pulls/94/commits"},"statuses":{"href":"https://api.github.com/repos/mjackson/expect/statuses/f81e4486a223322ca8e58304e2177de9f0acd4c3"}}}}