{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/comments/62947861","id":62947861,"diff_hunk":"@@ -98,44 +98,40 @@ describe('Module Tests', function() {\n   it('should throw an error when the first parameter is not defined', function() {\n     const lighthouse = require('../..');\n     return lighthouse()\n-    .then(() => {\n-      assert.error(new Error('Should not have resolved when first arg is not a string'));\n-    })\n-    .catch(err => {\n-      assert.ok(err);\n-    });\n+      .then(() => {\n+        throw new Error('Should not have resolved when first arg is not a string');\n+      }, err => {\n+        assert.ok(err);\n+      });\n   });\n \n   it('should throw an error when the first parameter is an empty string', function() {\n     const lighthouse = require('../..');\n-    return lighthouse()\n-    .then(() => {\n-      assert.error(new Error('Should not have resolved when first arg is not a string'));\n-    })\n-    .catch(err => {\n-      assert.ok(err);\n-    });\n+    return lighthouse('')","path":"test/module/index.js","position":26,"original_position":26,"commit_id":"14acdbd44f76551f96853c974510edf3a69f419a","original_commit_id":"14acdbd44f76551f96853c974510edf3a69f419a","user":{"login":"brendankenny","id":316891,"avatar_url":"https://avatars.githubusercontent.com/u/316891?v=3","gravatar_id":"","url":"https://api.github.com/users/brendankenny","html_url":"https://github.com/brendankenny","followers_url":"https://api.github.com/users/brendankenny/followers","following_url":"https://api.github.com/users/brendankenny/following{/other_user}","gists_url":"https://api.github.com/users/brendankenny/gists{/gist_id}","starred_url":"https://api.github.com/users/brendankenny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendankenny/subscriptions","organizations_url":"https://api.github.com/users/brendankenny/orgs","repos_url":"https://api.github.com/users/brendankenny/repos","events_url":"https://api.github.com/users/brendankenny/events{/privacy}","received_events_url":"https://api.github.com/users/brendankenny/received_events","type":"User","site_admin":false},"body":"added empty string to match test description","created_at":"2016-05-12T00:07:24Z","updated_at":"2016-05-12T00:07:24Z","html_url":"https://github.com/GoogleChrome/lighthouse/pull/318#discussion_r62947861","pull_request_url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/318","_links":{"self":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/comments/62947861"},"html":{"href":"https://github.com/GoogleChrome/lighthouse/pull/318#discussion_r62947861"},"pull_request":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/318"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/318","id":69761894,"html_url":"https://github.com/GoogleChrome/lighthouse/pull/318","diff_url":"https://github.com/GoogleChrome/lighthouse/pull/318.diff","patch_url":"https://github.com/GoogleChrome/lighthouse/pull/318.patch","issue_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/318","number":318,"state":"open","locked":false,"title":"fix error catches in module tests","user":{"login":"brendankenny","id":316891,"avatar_url":"https://avatars.githubusercontent.com/u/316891?v=3","gravatar_id":"","url":"https://api.github.com/users/brendankenny","html_url":"https://github.com/brendankenny","followers_url":"https://api.github.com/users/brendankenny/followers","following_url":"https://api.github.com/users/brendankenny/following{/other_user}","gists_url":"https://api.github.com/users/brendankenny/gists{/gist_id}","starred_url":"https://api.github.com/users/brendankenny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendankenny/subscriptions","organizations_url":"https://api.github.com/users/brendankenny/orgs","repos_url":"https://api.github.com/users/brendankenny/repos","events_url":"https://api.github.com/users/brendankenny/events{/privacy}","received_events_url":"https://api.github.com/users/brendankenny/received_events","type":"User","site_admin":false},"body":"some of the module tests meant to fail weren't testing what they were supposed to be testing: `assert.error` isn't a thing, but the exception thrown on that would be caught, and so the test would succeed. Those tests now successfully throw on success, pass on failure. Bonus: unit tests now run 10 seconds faster as the last module test doesn't run until timeout.\r\n\r\nAlso wraps the entire lighthouse module code in a Promise so any early failures (e.g. in last module test which throws a `TypeError` on attempting to set flags on a string) are actually caught in the lighthouse promise chain and not as a normal exception.","created_at":"2016-05-12T00:06:46Z","updated_at":"2016-05-12T00:07:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"05a6074d6547e5610d8ac00956d388fffabb1fe2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/318/commits","review_comments_url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/318/comments","review_comment_url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/318/comments","statuses_url":"https://api.github.com/repos/GoogleChrome/lighthouse/statuses/14acdbd44f76551f96853c974510edf3a69f419a","head":{"label":"brendankenny:moduler","ref":"moduler","sha":"14acdbd44f76551f96853c974510edf3a69f419a","user":{"login":"brendankenny","id":316891,"avatar_url":"https://avatars.githubusercontent.com/u/316891?v=3","gravatar_id":"","url":"https://api.github.com/users/brendankenny","html_url":"https://github.com/brendankenny","followers_url":"https://api.github.com/users/brendankenny/followers","following_url":"https://api.github.com/users/brendankenny/following{/other_user}","gists_url":"https://api.github.com/users/brendankenny/gists{/gist_id}","starred_url":"https://api.github.com/users/brendankenny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendankenny/subscriptions","organizations_url":"https://api.github.com/users/brendankenny/orgs","repos_url":"https://api.github.com/users/brendankenny/repos","events_url":"https://api.github.com/users/brendankenny/events{/privacy}","received_events_url":"https://api.github.com/users/brendankenny/received_events","type":"User","site_admin":false},"repo":{"id":53702738,"name":"lighthouse","full_name":"brendankenny/lighthouse","owner":{"login":"brendankenny","id":316891,"avatar_url":"https://avatars.githubusercontent.com/u/316891?v=3","gravatar_id":"","url":"https://api.github.com/users/brendankenny","html_url":"https://github.com/brendankenny","followers_url":"https://api.github.com/users/brendankenny/followers","following_url":"https://api.github.com/users/brendankenny/following{/other_user}","gists_url":"https://api.github.com/users/brendankenny/gists{/gist_id}","starred_url":"https://api.github.com/users/brendankenny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendankenny/subscriptions","organizations_url":"https://api.github.com/users/brendankenny/orgs","repos_url":"https://api.github.com/users/brendankenny/repos","events_url":"https://api.github.com/users/brendankenny/events{/privacy}","received_events_url":"https://api.github.com/users/brendankenny/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/brendankenny/lighthouse","description":null,"fork":true,"url":"https://api.github.com/repos/brendankenny/lighthouse","forks_url":"https://api.github.com/repos/brendankenny/lighthouse/forks","keys_url":"https://api.github.com/repos/brendankenny/lighthouse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brendankenny/lighthouse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brendankenny/lighthouse/teams","hooks_url":"https://api.github.com/repos/brendankenny/lighthouse/hooks","issue_events_url":"https://api.github.com/repos/brendankenny/lighthouse/issues/events{/number}","events_url":"https://api.github.com/repos/brendankenny/lighthouse/events","assignees_url":"https://api.github.com/repos/brendankenny/lighthouse/assignees{/user}","branches_url":"https://api.github.com/repos/brendankenny/lighthouse/branches{/branch}","tags_url":"https://api.github.com/repos/brendankenny/lighthouse/tags","blobs_url":"https://api.github.com/repos/brendankenny/lighthouse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brendankenny/lighthouse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brendankenny/lighthouse/git/refs{/sha}","trees_url":"https://api.github.com/repos/brendankenny/lighthouse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brendankenny/lighthouse/statuses/{sha}","languages_url":"https://api.github.com/repos/brendankenny/lighthouse/languages","stargazers_url":"https://api.github.com/repos/brendankenny/lighthouse/stargazers","contributors_url":"https://api.github.com/repos/brendankenny/lighthouse/contributors","subscribers_url":"https://api.github.com/repos/brendankenny/lighthouse/subscribers","subscription_url":"https://api.github.com/repos/brendankenny/lighthouse/subscription","commits_url":"https://api.github.com/repos/brendankenny/lighthouse/commits{/sha}","git_commits_url":"https://api.github.com/repos/brendankenny/lighthouse/git/commits{/sha}","comments_url":"https://api.github.com/repos/brendankenny/lighthouse/comments{/number}","issue_comment_url":"https://api.github.com/repos/brendankenny/lighthouse/issues/comments{/number}","contents_url":"https://api.github.com/repos/brendankenny/lighthouse/contents/{+path}","compare_url":"https://api.github.com/repos/brendankenny/lighthouse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brendankenny/lighthouse/merges","archive_url":"https://api.github.com/repos/brendankenny/lighthouse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brendankenny/lighthouse/downloads","issues_url":"https://api.github.com/repos/brendankenny/lighthouse/issues{/number}","pulls_url":"https://api.github.com/repos/brendankenny/lighthouse/pulls{/number}","milestones_url":"https://api.github.com/repos/brendankenny/lighthouse/milestones{/number}","notifications_url":"https://api.github.com/repos/brendankenny/lighthouse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brendankenny/lighthouse/labels{/name}","releases_url":"https://api.github.com/repos/brendankenny/lighthouse/releases{/id}","deployments_url":"https://api.github.com/repos/brendankenny/lighthouse/deployments","created_at":"2016-03-11T23:23:05Z","updated_at":"2016-03-11T23:23:06Z","pushed_at":"2016-05-11T23:59:54Z","git_url":"git://github.com/brendankenny/lighthouse.git","ssh_url":"git@github.com:brendankenny/lighthouse.git","clone_url":"https://github.com/brendankenny/lighthouse.git","svn_url":"https://github.com/brendankenny/lighthouse","homepage":null,"size":5818,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":false,"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":"GoogleChrome:master","ref":"master","sha":"734d2dbfcd5a01e6d2b7e381fad848c4160ee291","user":{"login":"GoogleChrome","id":1778935,"avatar_url":"https://avatars.githubusercontent.com/u/1778935?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleChrome","html_url":"https://github.com/GoogleChrome","followers_url":"https://api.github.com/users/GoogleChrome/followers","following_url":"https://api.github.com/users/GoogleChrome/following{/other_user}","gists_url":"https://api.github.com/users/GoogleChrome/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleChrome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleChrome/subscriptions","organizations_url":"https://api.github.com/users/GoogleChrome/orgs","repos_url":"https://api.github.com/users/GoogleChrome/repos","events_url":"https://api.github.com/users/GoogleChrome/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleChrome/received_events","type":"Organization","site_admin":false},"repo":{"id":53370988,"name":"lighthouse","full_name":"GoogleChrome/lighthouse","owner":{"login":"GoogleChrome","id":1778935,"avatar_url":"https://avatars.githubusercontent.com/u/1778935?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleChrome","html_url":"https://github.com/GoogleChrome","followers_url":"https://api.github.com/users/GoogleChrome/followers","following_url":"https://api.github.com/users/GoogleChrome/following{/other_user}","gists_url":"https://api.github.com/users/GoogleChrome/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleChrome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleChrome/subscriptions","organizations_url":"https://api.github.com/users/GoogleChrome/orgs","repos_url":"https://api.github.com/users/GoogleChrome/repos","events_url":"https://api.github.com/users/GoogleChrome/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleChrome/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleChrome/lighthouse","description":null,"fork":false,"url":"https://api.github.com/repos/GoogleChrome/lighthouse","forks_url":"https://api.github.com/repos/GoogleChrome/lighthouse/forks","keys_url":"https://api.github.com/repos/GoogleChrome/lighthouse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleChrome/lighthouse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleChrome/lighthouse/teams","hooks_url":"https://api.github.com/repos/GoogleChrome/lighthouse/hooks","issue_events_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleChrome/lighthouse/events","assignees_url":"https://api.github.com/repos/GoogleChrome/lighthouse/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleChrome/lighthouse/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleChrome/lighthouse/tags","blobs_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleChrome/lighthouse/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleChrome/lighthouse/languages","stargazers_url":"https://api.github.com/repos/GoogleChrome/lighthouse/stargazers","contributors_url":"https://api.github.com/repos/GoogleChrome/lighthouse/contributors","subscribers_url":"https://api.github.com/repos/GoogleChrome/lighthouse/subscribers","subscription_url":"https://api.github.com/repos/GoogleChrome/lighthouse/subscription","commits_url":"https://api.github.com/repos/GoogleChrome/lighthouse/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleChrome/lighthouse/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleChrome/lighthouse/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleChrome/lighthouse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleChrome/lighthouse/merges","archive_url":"https://api.github.com/repos/GoogleChrome/lighthouse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleChrome/lighthouse/downloads","issues_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleChrome/lighthouse/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleChrome/lighthouse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleChrome/lighthouse/labels{/name}","releases_url":"https://api.github.com/repos/GoogleChrome/lighthouse/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleChrome/lighthouse/deployments","created_at":"2016-03-08T01:03:11Z","updated_at":"2016-05-07T07:18:30Z","pushed_at":"2016-05-12T00:06:46Z","git_url":"git://github.com/GoogleChrome/lighthouse.git","ssh_url":"git@github.com:GoogleChrome/lighthouse.git","clone_url":"https://github.com/GoogleChrome/lighthouse.git","svn_url":"https://github.com/GoogleChrome/lighthouse","homepage":null,"size":6207,"stargazers_count":90,"watchers_count":90,"language":"JavaScript","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":34,"forks":16,"open_issues":34,"watchers":90,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/318"},"html":{"href":"https://github.com/GoogleChrome/lighthouse/pull/318"},"issue":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/318"},"comments":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/318/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/318/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/318/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/statuses/14acdbd44f76551f96853c974510edf3a69f419a"}}}}