{"action":"created","comment":{"url":"https://api.github.com/repos/sindresorhus/ava/pulls/comments/61832238","id":61832238,"diff_hunk":"@@ -126,6 +128,17 @@ RunStatus.prototype.handleTest = function (test) {\n \tthis.emit('test', test, this);\n };\n \n+RunStatus.prototype.formatAssertionError = function (error) {\n+\tif (error.actual && error.expected) {\n+\t\treturn '\\n    ' + chalk.red(error.name + ': ' + error.message) + '\\n' +\n+\t\t\tchalk.green('    + expected') + chalk.red(' - actual') + '\\n\\n' +\n+\t\t\tchalk.red('    -' + error.actual) + '\\n' +\n+\t\t\tchalk.green('    +' + error.expected);\n+\t}\n+\n+\treturn chalk.red('\\n    ' + error.name + ': ' + error.message);","path":"lib/run-status.js","position":null,"original_position":21,"commit_id":"518202b3f678028300c90c0bd9f0d98365fd387c","original_commit_id":"a2bc919e798fd68f2408c34f398e93844b6313ca","user":{"login":"danilosampaio","id":3306249,"avatar_url":"https://avatars.githubusercontent.com/u/3306249?v=3","gravatar_id":"","url":"https://api.github.com/users/danilosampaio","html_url":"https://github.com/danilosampaio","followers_url":"https://api.github.com/users/danilosampaio/followers","following_url":"https://api.github.com/users/danilosampaio/following{/other_user}","gists_url":"https://api.github.com/users/danilosampaio/gists{/gist_id}","starred_url":"https://api.github.com/users/danilosampaio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danilosampaio/subscriptions","organizations_url":"https://api.github.com/users/danilosampaio/orgs","repos_url":"https://api.github.com/users/danilosampaio/repos","events_url":"https://api.github.com/users/danilosampaio/events{/privacy}","received_events_url":"https://api.github.com/users/danilosampaio/received_events","type":"User","site_admin":false},"body":"Done. :+1:\r\nI assumed not necessary create a new test/run-status.js, since the added tests already check RunStatus.formatAssertionError() output. Right? :smiley: ","created_at":"2016-05-03T02:11:13Z","updated_at":"2016-05-03T02:11:13Z","html_url":"https://github.com/sindresorhus/ava/pull/770#discussion_r61832238","pull_request_url":"https://api.github.com/repos/sindresorhus/ava/pulls/770","_links":{"self":{"href":"https://api.github.com/repos/sindresorhus/ava/pulls/comments/61832238"},"html":{"href":"https://github.com/sindresorhus/ava/pull/770#discussion_r61832238"},"pull_request":{"href":"https://api.github.com/repos/sindresorhus/ava/pulls/770"}}},"pull_request":{"url":"https://api.github.com/repos/sindresorhus/ava/pulls/770","id":66938018,"html_url":"https://github.com/sindresorhus/ava/pull/770","diff_url":"https://github.com/sindresorhus/ava/pull/770.diff","patch_url":"https://github.com/sindresorhus/ava/pull/770.patch","issue_url":"https://api.github.com/repos/sindresorhus/ava/issues/770","number":770,"state":"open","locked":false,"title":"Enhance AssertionError message - `Fixes #764`","user":{"login":"danilosampaio","id":3306249,"avatar_url":"https://avatars.githubusercontent.com/u/3306249?v=3","gravatar_id":"","url":"https://api.github.com/users/danilosampaio","html_url":"https://github.com/danilosampaio","followers_url":"https://api.github.com/users/danilosampaio/followers","following_url":"https://api.github.com/users/danilosampaio/following{/other_user}","gists_url":"https://api.github.com/users/danilosampaio/gists{/gist_id}","starred_url":"https://api.github.com/users/danilosampaio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danilosampaio/subscriptions","organizations_url":"https://api.github.com/users/danilosampaio/orgs","repos_url":"https://api.github.com/users/danilosampaio/repos","events_url":"https://api.github.com/users/danilosampaio/events{/privacy}","received_events_url":"https://api.github.com/users/danilosampaio/received_events","type":"User","site_admin":false},"body":"This adds `expected` and `actual` to AssertionError message when it's not enhanced by power-assert.\r\nFixes #764\r\n\r\n#### Before\r\n```\r\n  1. [anonymous]\r\n  foo\r\n      Test.fn (test.js:5:10)\r\n```\r\n\r\n#### After\r\n\r\n```\r\n   1. [anonymous]\r\n   \r\n    AssertionError: foo\r\n    + expected - actual\r\n\r\n    -3\r\n    +4\r\n      Test.fn (test.js:5:10)\r\n```","created_at":"2016-04-18T23:22:12Z","updated_at":"2016-05-03T02:11:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0d0fc5a7cfff15ed80cf33c436661b50417f1003","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sindresorhus/ava/pulls/770/commits","review_comments_url":"https://api.github.com/repos/sindresorhus/ava/pulls/770/comments","review_comment_url":"https://api.github.com/repos/sindresorhus/ava/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sindresorhus/ava/issues/770/comments","statuses_url":"https://api.github.com/repos/sindresorhus/ava/statuses/518202b3f678028300c90c0bd9f0d98365fd387c","head":{"label":"danilosampaio:assertion-error-output","ref":"assertion-error-output","sha":"518202b3f678028300c90c0bd9f0d98365fd387c","user":{"login":"danilosampaio","id":3306249,"avatar_url":"https://avatars.githubusercontent.com/u/3306249?v=3","gravatar_id":"","url":"https://api.github.com/users/danilosampaio","html_url":"https://github.com/danilosampaio","followers_url":"https://api.github.com/users/danilosampaio/followers","following_url":"https://api.github.com/users/danilosampaio/following{/other_user}","gists_url":"https://api.github.com/users/danilosampaio/gists{/gist_id}","starred_url":"https://api.github.com/users/danilosampaio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danilosampaio/subscriptions","organizations_url":"https://api.github.com/users/danilosampaio/orgs","repos_url":"https://api.github.com/users/danilosampaio/repos","events_url":"https://api.github.com/users/danilosampaio/events{/privacy}","received_events_url":"https://api.github.com/users/danilosampaio/received_events","type":"User","site_admin":false},"repo":{"id":56524921,"name":"ava","full_name":"danilosampaio/ava","owner":{"login":"danilosampaio","id":3306249,"avatar_url":"https://avatars.githubusercontent.com/u/3306249?v=3","gravatar_id":"","url":"https://api.github.com/users/danilosampaio","html_url":"https://github.com/danilosampaio","followers_url":"https://api.github.com/users/danilosampaio/followers","following_url":"https://api.github.com/users/danilosampaio/following{/other_user}","gists_url":"https://api.github.com/users/danilosampaio/gists{/gist_id}","starred_url":"https://api.github.com/users/danilosampaio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danilosampaio/subscriptions","organizations_url":"https://api.github.com/users/danilosampaio/orgs","repos_url":"https://api.github.com/users/danilosampaio/repos","events_url":"https://api.github.com/users/danilosampaio/events{/privacy}","received_events_url":"https://api.github.com/users/danilosampaio/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/danilosampaio/ava","description":"Futuristic test runner :rocket:","fork":true,"url":"https://api.github.com/repos/danilosampaio/ava","forks_url":"https://api.github.com/repos/danilosampaio/ava/forks","keys_url":"https://api.github.com/repos/danilosampaio/ava/keys{/key_id}","collaborators_url":"https://api.github.com/repos/danilosampaio/ava/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/danilosampaio/ava/teams","hooks_url":"https://api.github.com/repos/danilosampaio/ava/hooks","issue_events_url":"https://api.github.com/repos/danilosampaio/ava/issues/events{/number}","events_url":"https://api.github.com/repos/danilosampaio/ava/events","assignees_url":"https://api.github.com/repos/danilosampaio/ava/assignees{/user}","branches_url":"https://api.github.com/repos/danilosampaio/ava/branches{/branch}","tags_url":"https://api.github.com/repos/danilosampaio/ava/tags","blobs_url":"https://api.github.com/repos/danilosampaio/ava/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/danilosampaio/ava/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/danilosampaio/ava/git/refs{/sha}","trees_url":"https://api.github.com/repos/danilosampaio/ava/git/trees{/sha}","statuses_url":"https://api.github.com/repos/danilosampaio/ava/statuses/{sha}","languages_url":"https://api.github.com/repos/danilosampaio/ava/languages","stargazers_url":"https://api.github.com/repos/danilosampaio/ava/stargazers","contributors_url":"https://api.github.com/repos/danilosampaio/ava/contributors","subscribers_url":"https://api.github.com/repos/danilosampaio/ava/subscribers","subscription_url":"https://api.github.com/repos/danilosampaio/ava/subscription","commits_url":"https://api.github.com/repos/danilosampaio/ava/commits{/sha}","git_commits_url":"https://api.github.com/repos/danilosampaio/ava/git/commits{/sha}","comments_url":"https://api.github.com/repos/danilosampaio/ava/comments{/number}","issue_comment_url":"https://api.github.com/repos/danilosampaio/ava/issues/comments{/number}","contents_url":"https://api.github.com/repos/danilosampaio/ava/contents/{+path}","compare_url":"https://api.github.com/repos/danilosampaio/ava/compare/{base}...{head}","merges_url":"https://api.github.com/repos/danilosampaio/ava/merges","archive_url":"https://api.github.com/repos/danilosampaio/ava/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/danilosampaio/ava/downloads","issues_url":"https://api.github.com/repos/danilosampaio/ava/issues{/number}","pulls_url":"https://api.github.com/repos/danilosampaio/ava/pulls{/number}","milestones_url":"https://api.github.com/repos/danilosampaio/ava/milestones{/number}","notifications_url":"https://api.github.com/repos/danilosampaio/ava/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/danilosampaio/ava/labels{/name}","releases_url":"https://api.github.com/repos/danilosampaio/ava/releases{/id}","deployments_url":"https://api.github.com/repos/danilosampaio/ava/deployments","created_at":"2016-04-18T16:44:22Z","updated_at":"2016-04-18T16:44:23Z","pushed_at":"2016-05-03T01:46:32Z","git_url":"git://github.com/danilosampaio/ava.git","ssh_url":"git@github.com:danilosampaio/ava.git","clone_url":"https://github.com/danilosampaio/ava.git","svn_url":"https://github.com/danilosampaio/ava","homepage":"","size":3783,"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":"sindresorhus:master","ref":"master","sha":"0c1dbf0e61846cdaa9f74653ee211013e5993dd1","user":{"login":"sindresorhus","id":170270,"avatar_url":"https://avatars.githubusercontent.com/u/170270?v=3","gravatar_id":"","url":"https://api.github.com/users/sindresorhus","html_url":"https://github.com/sindresorhus","followers_url":"https://api.github.com/users/sindresorhus/followers","following_url":"https://api.github.com/users/sindresorhus/following{/other_user}","gists_url":"https://api.github.com/users/sindresorhus/gists{/gist_id}","starred_url":"https://api.github.com/users/sindresorhus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sindresorhus/subscriptions","organizations_url":"https://api.github.com/users/sindresorhus/orgs","repos_url":"https://api.github.com/users/sindresorhus/repos","events_url":"https://api.github.com/users/sindresorhus/events{/privacy}","received_events_url":"https://api.github.com/users/sindresorhus/received_events","type":"User","site_admin":false},"repo":{"id":26820798,"name":"ava","full_name":"sindresorhus/ava","owner":{"login":"sindresorhus","id":170270,"avatar_url":"https://avatars.githubusercontent.com/u/170270?v=3","gravatar_id":"","url":"https://api.github.com/users/sindresorhus","html_url":"https://github.com/sindresorhus","followers_url":"https://api.github.com/users/sindresorhus/followers","following_url":"https://api.github.com/users/sindresorhus/following{/other_user}","gists_url":"https://api.github.com/users/sindresorhus/gists{/gist_id}","starred_url":"https://api.github.com/users/sindresorhus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sindresorhus/subscriptions","organizations_url":"https://api.github.com/users/sindresorhus/orgs","repos_url":"https://api.github.com/users/sindresorhus/repos","events_url":"https://api.github.com/users/sindresorhus/events{/privacy}","received_events_url":"https://api.github.com/users/sindresorhus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sindresorhus/ava","description":"Futuristic test runner :rocket:","fork":false,"url":"https://api.github.com/repos/sindresorhus/ava","forks_url":"https://api.github.com/repos/sindresorhus/ava/forks","keys_url":"https://api.github.com/repos/sindresorhus/ava/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sindresorhus/ava/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sindresorhus/ava/teams","hooks_url":"https://api.github.com/repos/sindresorhus/ava/hooks","issue_events_url":"https://api.github.com/repos/sindresorhus/ava/issues/events{/number}","events_url":"https://api.github.com/repos/sindresorhus/ava/events","assignees_url":"https://api.github.com/repos/sindresorhus/ava/assignees{/user}","branches_url":"https://api.github.com/repos/sindresorhus/ava/branches{/branch}","tags_url":"https://api.github.com/repos/sindresorhus/ava/tags","blobs_url":"https://api.github.com/repos/sindresorhus/ava/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sindresorhus/ava/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sindresorhus/ava/git/refs{/sha}","trees_url":"https://api.github.com/repos/sindresorhus/ava/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sindresorhus/ava/statuses/{sha}","languages_url":"https://api.github.com/repos/sindresorhus/ava/languages","stargazers_url":"https://api.github.com/repos/sindresorhus/ava/stargazers","contributors_url":"https://api.github.com/repos/sindresorhus/ava/contributors","subscribers_url":"https://api.github.com/repos/sindresorhus/ava/subscribers","subscription_url":"https://api.github.com/repos/sindresorhus/ava/subscription","commits_url":"https://api.github.com/repos/sindresorhus/ava/commits{/sha}","git_commits_url":"https://api.github.com/repos/sindresorhus/ava/git/commits{/sha}","comments_url":"https://api.github.com/repos/sindresorhus/ava/comments{/number}","issue_comment_url":"https://api.github.com/repos/sindresorhus/ava/issues/comments{/number}","contents_url":"https://api.github.com/repos/sindresorhus/ava/contents/{+path}","compare_url":"https://api.github.com/repos/sindresorhus/ava/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sindresorhus/ava/merges","archive_url":"https://api.github.com/repos/sindresorhus/ava/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sindresorhus/ava/downloads","issues_url":"https://api.github.com/repos/sindresorhus/ava/issues{/number}","pulls_url":"https://api.github.com/repos/sindresorhus/ava/pulls{/number}","milestones_url":"https://api.github.com/repos/sindresorhus/ava/milestones{/number}","notifications_url":"https://api.github.com/repos/sindresorhus/ava/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sindresorhus/ava/labels{/name}","releases_url":"https://api.github.com/repos/sindresorhus/ava/releases{/id}","deployments_url":"https://api.github.com/repos/sindresorhus/ava/deployments","created_at":"2014-11-18T17:20:26Z","updated_at":"2016-05-03T01:34:37Z","pushed_at":"2016-05-03T01:46:32Z","git_url":"git://github.com/sindresorhus/ava.git","ssh_url":"git@github.com:sindresorhus/ava.git","clone_url":"https://github.com/sindresorhus/ava.git","svn_url":"https://github.com/sindresorhus/ava","homepage":"","size":4288,"stargazers_count":4498,"watchers_count":4498,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":177,"mirror_url":null,"open_issues_count":109,"forks":177,"open_issues":109,"watchers":4498,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sindresorhus/ava/pulls/770"},"html":{"href":"https://github.com/sindresorhus/ava/pull/770"},"issue":{"href":"https://api.github.com/repos/sindresorhus/ava/issues/770"},"comments":{"href":"https://api.github.com/repos/sindresorhus/ava/issues/770/comments"},"review_comments":{"href":"https://api.github.com/repos/sindresorhus/ava/pulls/770/comments"},"review_comment":{"href":"https://api.github.com/repos/sindresorhus/ava/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sindresorhus/ava/pulls/770/commits"},"statuses":{"href":"https://api.github.com/repos/sindresorhus/ava/statuses/518202b3f678028300c90c0bd9f0d98365fd387c"}}}}