{"action":"created","comment":{"url":"https://api.github.com/repos/sindresorhus/ava/pulls/comments/59141189","id":59141189,"diff_hunk":"@@ -145,7 +146,7 @@ test('uses babelConfig for babel options when babelConfig is an object', functio\n \tt.true('inputSourceMap' in options);\n \tt.false(options.babelrc);\n \tt.same(options.presets, ['stage-2', 'es2015']);\n-\tt.same(options.plugins, [customPlugin, powerAssert, rewrite, transformRuntime]);\n+\tt.same(options.plugins, [customPlugin, powerAssert, throwsHelper, rewrite, transformRuntime]);","path":"test/caching-precompiler.js","position":13,"original_position":13,"commit_id":"dbed3d4076c1bfa613ce3301742884f747c920f2","original_commit_id":"1f431c4fe05acaf53099fbc13419d1aad8cac490","user":{"login":"jamestalmage","id":4082216,"avatar_url":"https://avatars.githubusercontent.com/u/4082216?v=3","gravatar_id":"","url":"https://api.github.com/users/jamestalmage","html_url":"https://github.com/jamestalmage","followers_url":"https://api.github.com/users/jamestalmage/followers","following_url":"https://api.github.com/users/jamestalmage/following{/other_user}","gists_url":"https://api.github.com/users/jamestalmage/gists{/gist_id}","starred_url":"https://api.github.com/users/jamestalmage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamestalmage/subscriptions","organizations_url":"https://api.github.com/users/jamestalmage/orgs","repos_url":"https://api.github.com/users/jamestalmage/repos","events_url":"https://api.github.com/users/jamestalmage/events{/privacy}","received_events_url":"https://api.github.com/users/jamestalmage/received_events","type":"User","site_admin":false},"body":"Oh - Understood. Still not a problem though. `power-assert` wraps inline, just like `ava-throws-helper`.\r\n\r\n```js\r\nt.true(_rec._expr(_rec._capt(_rec._capt(a, 'arguments/0/left') === 'bar', 'arguments/0'), {\r\n\tcontent: 't.true(a === \\'bar\\')',\r\n\tfilepath: 'test/fixture/power-assert.js',\r\n\tline: 6\r\n}));\r\n```\r\n\r\nAlso, we don't enhance `t.throws` with `power-assert`.","created_at":"2016-04-10T20:50:21Z","updated_at":"2016-04-10T20:50:21Z","html_url":"https://github.com/sindresorhus/ava/pull/742#discussion_r59141189","pull_request_url":"https://api.github.com/repos/sindresorhus/ava/pulls/742","_links":{"self":{"href":"https://api.github.com/repos/sindresorhus/ava/pulls/comments/59141189"},"html":{"href":"https://github.com/sindresorhus/ava/pull/742#discussion_r59141189"},"pull_request":{"href":"https://api.github.com/repos/sindresorhus/ava/pulls/742"}}},"pull_request":{"url":"https://api.github.com/repos/sindresorhus/ava/pulls/742","id":65867780,"html_url":"https://github.com/sindresorhus/ava/pull/742","diff_url":"https://github.com/sindresorhus/ava/pull/742.diff","patch_url":"https://github.com/sindresorhus/ava/pull/742.patch","issue_url":"https://api.github.com/repos/sindresorhus/ava/issues/742","number":742,"state":"open","locked":false,"title":"detect improper use of t.throws","user":{"login":"jamestalmage","id":4082216,"avatar_url":"https://avatars.githubusercontent.com/u/4082216?v=3","gravatar_id":"","url":"https://api.github.com/users/jamestalmage","html_url":"https://github.com/jamestalmage","followers_url":"https://api.github.com/users/jamestalmage/followers","following_url":"https://api.github.com/users/jamestalmage/following{/other_user}","gists_url":"https://api.github.com/users/jamestalmage/gists{/gist_id}","starred_url":"https://api.github.com/users/jamestalmage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamestalmage/subscriptions","organizations_url":"https://api.github.com/users/jamestalmage/orgs","repos_url":"https://api.github.com/users/jamestalmage/repos","events_url":"https://api.github.com/users/jamestalmage/events{/privacy}","received_events_url":"https://api.github.com/users/jamestalmage/received_events","type":"User","site_admin":false},"body":"Protects against a common misuse of t.throws (Like that seen in #739).\r\n\r\nThis required the creation of a custom babel plugin.\r\n\r\nhttps://github.com/jamestalmage/babel-plugin-ava-throws-helper\r\n\r\n\r\n\r\nSample output:\r\n\r\n```\r\nImproper usage of t.throws detected at /Users/jamestalmage/dev/ava/test/fixture/improper-t-throws.js (4:10).\r\n\r\nYou should wrap the following expression in a function:\r\n\r\n  throwSync()\r\n\r\nLike this:\r\n\r\n  function() {\r\n    throwSync()\r\n  }\r\n\r\nSee https://github.com/sindresorhus/ava#throwsfunctionpromise-error-message for more details.\r\n```\r\n\r\nThe linked documentation isn't that helpful. We should probably make a short recipe about this. (maybe a `common-mistakes` recipe? This seems like too small a topic for a whole recipe). We can update the URL when that recipe is written.","created_at":"2016-04-09T02:13:32Z","updated_at":"2016-04-10T20:50:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"262dc016d1abe0cf12569bd14196f49daebde8ee","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sindresorhus/ava/pulls/742/commits","review_comments_url":"https://api.github.com/repos/sindresorhus/ava/pulls/742/comments","review_comment_url":"https://api.github.com/repos/sindresorhus/ava/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sindresorhus/ava/issues/742/comments","statuses_url":"https://api.github.com/repos/sindresorhus/ava/statuses/dbed3d4076c1bfa613ce3301742884f747c920f2","head":{"label":"jamestalmage:use-ava-throws-helper","ref":"use-ava-throws-helper","sha":"dbed3d4076c1bfa613ce3301742884f747c920f2","user":{"login":"jamestalmage","id":4082216,"avatar_url":"https://avatars.githubusercontent.com/u/4082216?v=3","gravatar_id":"","url":"https://api.github.com/users/jamestalmage","html_url":"https://github.com/jamestalmage","followers_url":"https://api.github.com/users/jamestalmage/followers","following_url":"https://api.github.com/users/jamestalmage/following{/other_user}","gists_url":"https://api.github.com/users/jamestalmage/gists{/gist_id}","starred_url":"https://api.github.com/users/jamestalmage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamestalmage/subscriptions","organizations_url":"https://api.github.com/users/jamestalmage/orgs","repos_url":"https://api.github.com/users/jamestalmage/repos","events_url":"https://api.github.com/users/jamestalmage/events{/privacy}","received_events_url":"https://api.github.com/users/jamestalmage/received_events","type":"User","site_admin":false},"repo":{"id":45423629,"name":"ava","full_name":"jamestalmage/ava","owner":{"login":"jamestalmage","id":4082216,"avatar_url":"https://avatars.githubusercontent.com/u/4082216?v=3","gravatar_id":"","url":"https://api.github.com/users/jamestalmage","html_url":"https://github.com/jamestalmage","followers_url":"https://api.github.com/users/jamestalmage/followers","following_url":"https://api.github.com/users/jamestalmage/following{/other_user}","gists_url":"https://api.github.com/users/jamestalmage/gists{/gist_id}","starred_url":"https://api.github.com/users/jamestalmage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamestalmage/subscriptions","organizations_url":"https://api.github.com/users/jamestalmage/orgs","repos_url":"https://api.github.com/users/jamestalmage/repos","events_url":"https://api.github.com/users/jamestalmage/events{/privacy}","received_events_url":"https://api.github.com/users/jamestalmage/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jamestalmage/ava","description":"Futuristic test runner :rocket:","fork":true,"url":"https://api.github.com/repos/jamestalmage/ava","forks_url":"https://api.github.com/repos/jamestalmage/ava/forks","keys_url":"https://api.github.com/repos/jamestalmage/ava/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jamestalmage/ava/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jamestalmage/ava/teams","hooks_url":"https://api.github.com/repos/jamestalmage/ava/hooks","issue_events_url":"https://api.github.com/repos/jamestalmage/ava/issues/events{/number}","events_url":"https://api.github.com/repos/jamestalmage/ava/events","assignees_url":"https://api.github.com/repos/jamestalmage/ava/assignees{/user}","branches_url":"https://api.github.com/repos/jamestalmage/ava/branches{/branch}","tags_url":"https://api.github.com/repos/jamestalmage/ava/tags","blobs_url":"https://api.github.com/repos/jamestalmage/ava/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jamestalmage/ava/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jamestalmage/ava/git/refs{/sha}","trees_url":"https://api.github.com/repos/jamestalmage/ava/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jamestalmage/ava/statuses/{sha}","languages_url":"https://api.github.com/repos/jamestalmage/ava/languages","stargazers_url":"https://api.github.com/repos/jamestalmage/ava/stargazers","contributors_url":"https://api.github.com/repos/jamestalmage/ava/contributors","subscribers_url":"https://api.github.com/repos/jamestalmage/ava/subscribers","subscription_url":"https://api.github.com/repos/jamestalmage/ava/subscription","commits_url":"https://api.github.com/repos/jamestalmage/ava/commits{/sha}","git_commits_url":"https://api.github.com/repos/jamestalmage/ava/git/commits{/sha}","comments_url":"https://api.github.com/repos/jamestalmage/ava/comments{/number}","issue_comment_url":"https://api.github.com/repos/jamestalmage/ava/issues/comments{/number}","contents_url":"https://api.github.com/repos/jamestalmage/ava/contents/{+path}","compare_url":"https://api.github.com/repos/jamestalmage/ava/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jamestalmage/ava/merges","archive_url":"https://api.github.com/repos/jamestalmage/ava/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jamestalmage/ava/downloads","issues_url":"https://api.github.com/repos/jamestalmage/ava/issues{/number}","pulls_url":"https://api.github.com/repos/jamestalmage/ava/pulls{/number}","milestones_url":"https://api.github.com/repos/jamestalmage/ava/milestones{/number}","notifications_url":"https://api.github.com/repos/jamestalmage/ava/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jamestalmage/ava/labels{/name}","releases_url":"https://api.github.com/repos/jamestalmage/ava/releases{/id}","deployments_url":"https://api.github.com/repos/jamestalmage/ava/deployments","created_at":"2015-11-02T21:35:12Z","updated_at":"2016-04-06T22:44:42Z","pushed_at":"2016-04-10T20:43:14Z","git_url":"git://github.com/jamestalmage/ava.git","ssh_url":"git@github.com:jamestalmage/ava.git","clone_url":"https://github.com/jamestalmage/ava.git","svn_url":"https://github.com/jamestalmage/ava","homepage":"","size":3702,"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":"da39639b5d0f570975d75d6cdde30aab0890f87c","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-04-10T20:00:37Z","pushed_at":"2016-04-10T20:43:15Z","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":4136,"stargazers_count":4220,"watchers_count":4220,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":161,"mirror_url":null,"open_issues_count":92,"forks":161,"open_issues":92,"watchers":4220,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sindresorhus/ava/pulls/742"},"html":{"href":"https://github.com/sindresorhus/ava/pull/742"},"issue":{"href":"https://api.github.com/repos/sindresorhus/ava/issues/742"},"comments":{"href":"https://api.github.com/repos/sindresorhus/ava/issues/742/comments"},"review_comments":{"href":"https://api.github.com/repos/sindresorhus/ava/pulls/742/comments"},"review_comment":{"href":"https://api.github.com/repos/sindresorhus/ava/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sindresorhus/ava/pulls/742/commits"},"statuses":{"href":"https://api.github.com/repos/sindresorhus/ava/statuses/dbed3d4076c1bfa613ce3301742884f747c920f2"}}}}