{"action":"created","comment":{"url":"https://api.github.com/repos/C2FO/grunt-it/pulls/comments/95222420","pull_request_review_id":15770510,"id":95222420,"diff_hunk":"@@ -42,12 +42,22 @@ module.exports = function (grunt) {\n                 require(f);\n             });\n             it.run().then(function (results) {\n-                if (oToString(results) === \"[object Number]\") {\n-                    done(0 === results);\n-                } else {\n-                    done(results.errorCount === 0 &&\n-                        results.totalCount === (results.successCount + results.skippedCount) &&\n-                        results.pendingCount === 0);\n+                // support \"no tests found\"\n+                if (results === undefined) {\n+                    return done(true);\n+                }\n+\n+                try {\n+                    if (oToString(results) === \"[object Number]\") {\n+                        done(0 === results);\n+                    } else {\n+                        done(results.errorCount === 0 &&\n+                            results.totalCount === (results.successCount + results.skippedCount) &&\n+                            results.pendingCount === 0);\n+                    }\n+                } catch (error) {\n+                    console.error(error);","path":"tasks/it.js","position":24,"original_position":24,"commit_id":"08b211cacde090662f856678054421a9104c6ac9","original_commit_id":"08b211cacde090662f856678054421a9104c6ac9","user":{"login":"doug-martin","id":361261,"avatar_url":"https://avatars.githubusercontent.com/u/361261?v=3","gravatar_id":"","url":"https://api.github.com/users/doug-martin","html_url":"https://github.com/doug-martin","followers_url":"https://api.github.com/users/doug-martin/followers","following_url":"https://api.github.com/users/doug-martin/following{/other_user}","gists_url":"https://api.github.com/users/doug-martin/gists{/gist_id}","starred_url":"https://api.github.com/users/doug-martin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doug-martin/subscriptions","organizations_url":"https://api.github.com/users/doug-martin/orgs","repos_url":"https://api.github.com/users/doug-martin/repos","events_url":"https://api.github.com/users/doug-martin/events{/privacy}","received_events_url":"https://api.github.com/users/doug-martin/received_events","type":"User","site_admin":false},"body":"Will this print out the stack?","created_at":"2017-01-09T19:01:30Z","updated_at":"2017-01-09T19:01:30Z","html_url":"https://github.com/C2FO/grunt-it/pull/14#discussion_r95222420","pull_request_url":"https://api.github.com/repos/C2FO/grunt-it/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/C2FO/grunt-it/pulls/comments/95222420"},"html":{"href":"https://github.com/C2FO/grunt-it/pull/14#discussion_r95222420"},"pull_request":{"href":"https://api.github.com/repos/C2FO/grunt-it/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/C2FO/grunt-it/pulls/14","id":100724995,"html_url":"https://github.com/C2FO/grunt-it/pull/14","diff_url":"https://github.com/C2FO/grunt-it/pull/14.diff","patch_url":"https://github.com/C2FO/grunt-it/pull/14.patch","issue_url":"https://api.github.com/repos/C2FO/grunt-it/issues/14","number":14,"state":"closed","locked":false,"title":"support new version of grunt that no longer has a build in error handler","user":{"login":"vikeen","id":1700158,"avatar_url":"https://avatars.githubusercontent.com/u/1700158?v=3","gravatar_id":"","url":"https://api.github.com/users/vikeen","html_url":"https://github.com/vikeen","followers_url":"https://api.github.com/users/vikeen/followers","following_url":"https://api.github.com/users/vikeen/following{/other_user}","gists_url":"https://api.github.com/users/vikeen/gists{/gist_id}","starred_url":"https://api.github.com/users/vikeen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vikeen/subscriptions","organizations_url":"https://api.github.com/users/vikeen/orgs","repos_url":"https://api.github.com/users/vikeen/repos","events_url":"https://api.github.com/users/vikeen/events{/privacy}","received_events_url":"https://api.github.com/users/vikeen/received_events","type":"User","site_admin":false},"body":"Updating this to support a new version of grunt added in with https://github.com/C2FO/c2fo/pull/4408\r\n\r\nThe grunt's `registerMultiTask` used to have an error handler and it was removed at some point. We were getting an error when running the tests for folders without an actual test file, such as `grunt it:bus`. \r\n\r\n```shell\r\n$ grunt it:bus                                                                                                                                                               \r\nRunning \"it:bus\" (it) task\r\nNo Tests found\r\nresults124412412142: undefined\r\n[TypeError: Cannot read property 'errorCount' of undefined]\r\n```\r\n\r\nThis PR is aimed to fix that issue and add our own error catcher to hopefully prevent future issues.\r\n\r\n## Testing\r\n\r\nLink this module with `npm link` and run the c2fo test suite locally.\r\n\r\n* `$ cd grunt-it && npm link`\r\n* `$ cd $C2FO_HOME && npm link grunt-it`","created_at":"2017-01-09T17:21:45Z","updated_at":"2017-01-09T19:01:30Z","closed_at":"2017-01-09T19:00:00Z","merged_at":"2017-01-09T19:00:00Z","merge_commit_sha":"29a3191b752e953f3102e10290245ec011f56c5f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/C2FO/grunt-it/pulls/14/commits","review_comments_url":"https://api.github.com/repos/C2FO/grunt-it/pulls/14/comments","review_comment_url":"https://api.github.com/repos/C2FO/grunt-it/pulls/comments{/number}","comments_url":"https://api.github.com/repos/C2FO/grunt-it/issues/14/comments","statuses_url":"https://api.github.com/repos/C2FO/grunt-it/statuses/08b211cacde090662f856678054421a9104c6ac9","head":{"label":"C2FO:support-no-tests-found","ref":"support-no-tests-found","sha":"08b211cacde090662f856678054421a9104c6ac9","user":{"login":"C2FO","id":345895,"avatar_url":"https://avatars.githubusercontent.com/u/345895?v=3","gravatar_id":"","url":"https://api.github.com/users/C2FO","html_url":"https://github.com/C2FO","followers_url":"https://api.github.com/users/C2FO/followers","following_url":"https://api.github.com/users/C2FO/following{/other_user}","gists_url":"https://api.github.com/users/C2FO/gists{/gist_id}","starred_url":"https://api.github.com/users/C2FO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/C2FO/subscriptions","organizations_url":"https://api.github.com/users/C2FO/orgs","repos_url":"https://api.github.com/users/C2FO/repos","events_url":"https://api.github.com/users/C2FO/events{/privacy}","received_events_url":"https://api.github.com/users/C2FO/received_events","type":"Organization","site_admin":false},"repo":{"id":6343035,"name":"grunt-it","full_name":"C2FO/grunt-it","owner":{"login":"C2FO","id":345895,"avatar_url":"https://avatars.githubusercontent.com/u/345895?v=3","gravatar_id":"","url":"https://api.github.com/users/C2FO","html_url":"https://github.com/C2FO","followers_url":"https://api.github.com/users/C2FO/followers","following_url":"https://api.github.com/users/C2FO/following{/other_user}","gists_url":"https://api.github.com/users/C2FO/gists{/gist_id}","starred_url":"https://api.github.com/users/C2FO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/C2FO/subscriptions","organizations_url":"https://api.github.com/users/C2FO/orgs","repos_url":"https://api.github.com/users/C2FO/repos","events_url":"https://api.github.com/users/C2FO/events{/privacy}","received_events_url":"https://api.github.com/users/C2FO/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/C2FO/grunt-it","description":"A grunt wrapper for the it unit test framework","fork":false,"url":"https://api.github.com/repos/C2FO/grunt-it","forks_url":"https://api.github.com/repos/C2FO/grunt-it/forks","keys_url":"https://api.github.com/repos/C2FO/grunt-it/keys{/key_id}","collaborators_url":"https://api.github.com/repos/C2FO/grunt-it/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/C2FO/grunt-it/teams","hooks_url":"https://api.github.com/repos/C2FO/grunt-it/hooks","issue_events_url":"https://api.github.com/repos/C2FO/grunt-it/issues/events{/number}","events_url":"https://api.github.com/repos/C2FO/grunt-it/events","assignees_url":"https://api.github.com/repos/C2FO/grunt-it/assignees{/user}","branches_url":"https://api.github.com/repos/C2FO/grunt-it/branches{/branch}","tags_url":"https://api.github.com/repos/C2FO/grunt-it/tags","blobs_url":"https://api.github.com/repos/C2FO/grunt-it/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/C2FO/grunt-it/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/C2FO/grunt-it/git/refs{/sha}","trees_url":"https://api.github.com/repos/C2FO/grunt-it/git/trees{/sha}","statuses_url":"https://api.github.com/repos/C2FO/grunt-it/statuses/{sha}","languages_url":"https://api.github.com/repos/C2FO/grunt-it/languages","stargazers_url":"https://api.github.com/repos/C2FO/grunt-it/stargazers","contributors_url":"https://api.github.com/repos/C2FO/grunt-it/contributors","subscribers_url":"https://api.github.com/repos/C2FO/grunt-it/subscribers","subscription_url":"https://api.github.com/repos/C2FO/grunt-it/subscription","commits_url":"https://api.github.com/repos/C2FO/grunt-it/commits{/sha}","git_commits_url":"https://api.github.com/repos/C2FO/grunt-it/git/commits{/sha}","comments_url":"https://api.github.com/repos/C2FO/grunt-it/comments{/number}","issue_comment_url":"https://api.github.com/repos/C2FO/grunt-it/issues/comments{/number}","contents_url":"https://api.github.com/repos/C2FO/grunt-it/contents/{+path}","compare_url":"https://api.github.com/repos/C2FO/grunt-it/compare/{base}...{head}","merges_url":"https://api.github.com/repos/C2FO/grunt-it/merges","archive_url":"https://api.github.com/repos/C2FO/grunt-it/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/C2FO/grunt-it/downloads","issues_url":"https://api.github.com/repos/C2FO/grunt-it/issues{/number}","pulls_url":"https://api.github.com/repos/C2FO/grunt-it/pulls{/number}","milestones_url":"https://api.github.com/repos/C2FO/grunt-it/milestones{/number}","notifications_url":"https://api.github.com/repos/C2FO/grunt-it/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/C2FO/grunt-it/labels{/name}","releases_url":"https://api.github.com/repos/C2FO/grunt-it/releases{/id}","deployments_url":"https://api.github.com/repos/C2FO/grunt-it/deployments","created_at":"2012-10-22T21:58:12Z","updated_at":"2017-01-09T19:00:02Z","pushed_at":"2017-01-09T19:00:00Z","git_url":"git://github.com/C2FO/grunt-it.git","ssh_url":"git@github.com:C2FO/grunt-it.git","clone_url":"https://github.com/C2FO/grunt-it.git","svn_url":"https://github.com/C2FO/grunt-it","homepage":null,"size":18,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"C2FO:master","ref":"master","sha":"c83747f5ca2607fab34090a24be035580ac7b148","user":{"login":"C2FO","id":345895,"avatar_url":"https://avatars.githubusercontent.com/u/345895?v=3","gravatar_id":"","url":"https://api.github.com/users/C2FO","html_url":"https://github.com/C2FO","followers_url":"https://api.github.com/users/C2FO/followers","following_url":"https://api.github.com/users/C2FO/following{/other_user}","gists_url":"https://api.github.com/users/C2FO/gists{/gist_id}","starred_url":"https://api.github.com/users/C2FO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/C2FO/subscriptions","organizations_url":"https://api.github.com/users/C2FO/orgs","repos_url":"https://api.github.com/users/C2FO/repos","events_url":"https://api.github.com/users/C2FO/events{/privacy}","received_events_url":"https://api.github.com/users/C2FO/received_events","type":"Organization","site_admin":false},"repo":{"id":6343035,"name":"grunt-it","full_name":"C2FO/grunt-it","owner":{"login":"C2FO","id":345895,"avatar_url":"https://avatars.githubusercontent.com/u/345895?v=3","gravatar_id":"","url":"https://api.github.com/users/C2FO","html_url":"https://github.com/C2FO","followers_url":"https://api.github.com/users/C2FO/followers","following_url":"https://api.github.com/users/C2FO/following{/other_user}","gists_url":"https://api.github.com/users/C2FO/gists{/gist_id}","starred_url":"https://api.github.com/users/C2FO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/C2FO/subscriptions","organizations_url":"https://api.github.com/users/C2FO/orgs","repos_url":"https://api.github.com/users/C2FO/repos","events_url":"https://api.github.com/users/C2FO/events{/privacy}","received_events_url":"https://api.github.com/users/C2FO/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/C2FO/grunt-it","description":"A grunt wrapper for the it unit test framework","fork":false,"url":"https://api.github.com/repos/C2FO/grunt-it","forks_url":"https://api.github.com/repos/C2FO/grunt-it/forks","keys_url":"https://api.github.com/repos/C2FO/grunt-it/keys{/key_id}","collaborators_url":"https://api.github.com/repos/C2FO/grunt-it/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/C2FO/grunt-it/teams","hooks_url":"https://api.github.com/repos/C2FO/grunt-it/hooks","issue_events_url":"https://api.github.com/repos/C2FO/grunt-it/issues/events{/number}","events_url":"https://api.github.com/repos/C2FO/grunt-it/events","assignees_url":"https://api.github.com/repos/C2FO/grunt-it/assignees{/user}","branches_url":"https://api.github.com/repos/C2FO/grunt-it/branches{/branch}","tags_url":"https://api.github.com/repos/C2FO/grunt-it/tags","blobs_url":"https://api.github.com/repos/C2FO/grunt-it/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/C2FO/grunt-it/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/C2FO/grunt-it/git/refs{/sha}","trees_url":"https://api.github.com/repos/C2FO/grunt-it/git/trees{/sha}","statuses_url":"https://api.github.com/repos/C2FO/grunt-it/statuses/{sha}","languages_url":"https://api.github.com/repos/C2FO/grunt-it/languages","stargazers_url":"https://api.github.com/repos/C2FO/grunt-it/stargazers","contributors_url":"https://api.github.com/repos/C2FO/grunt-it/contributors","subscribers_url":"https://api.github.com/repos/C2FO/grunt-it/subscribers","subscription_url":"https://api.github.com/repos/C2FO/grunt-it/subscription","commits_url":"https://api.github.com/repos/C2FO/grunt-it/commits{/sha}","git_commits_url":"https://api.github.com/repos/C2FO/grunt-it/git/commits{/sha}","comments_url":"https://api.github.com/repos/C2FO/grunt-it/comments{/number}","issue_comment_url":"https://api.github.com/repos/C2FO/grunt-it/issues/comments{/number}","contents_url":"https://api.github.com/repos/C2FO/grunt-it/contents/{+path}","compare_url":"https://api.github.com/repos/C2FO/grunt-it/compare/{base}...{head}","merges_url":"https://api.github.com/repos/C2FO/grunt-it/merges","archive_url":"https://api.github.com/repos/C2FO/grunt-it/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/C2FO/grunt-it/downloads","issues_url":"https://api.github.com/repos/C2FO/grunt-it/issues{/number}","pulls_url":"https://api.github.com/repos/C2FO/grunt-it/pulls{/number}","milestones_url":"https://api.github.com/repos/C2FO/grunt-it/milestones{/number}","notifications_url":"https://api.github.com/repos/C2FO/grunt-it/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/C2FO/grunt-it/labels{/name}","releases_url":"https://api.github.com/repos/C2FO/grunt-it/releases{/id}","deployments_url":"https://api.github.com/repos/C2FO/grunt-it/deployments","created_at":"2012-10-22T21:58:12Z","updated_at":"2017-01-09T19:00:02Z","pushed_at":"2017-01-09T19:00:00Z","git_url":"git://github.com/C2FO/grunt-it.git","ssh_url":"git@github.com:C2FO/grunt-it.git","clone_url":"https://github.com/C2FO/grunt-it.git","svn_url":"https://github.com/C2FO/grunt-it","homepage":null,"size":18,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/C2FO/grunt-it/pulls/14"},"html":{"href":"https://github.com/C2FO/grunt-it/pull/14"},"issue":{"href":"https://api.github.com/repos/C2FO/grunt-it/issues/14"},"comments":{"href":"https://api.github.com/repos/C2FO/grunt-it/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/C2FO/grunt-it/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/C2FO/grunt-it/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/C2FO/grunt-it/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/C2FO/grunt-it/statuses/08b211cacde090662f856678054421a9104c6ac9"}}}}
{"actor":{"display_login":"doug-martin"}}