{"action":"opened","issue":{"url":"https://api.github.com/repos/mjackson/expect/issues/2","labels_url":"https://api.github.com/repos/mjackson/expect/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/mjackson/expect/issues/2/comments","events_url":"https://api.github.com/repos/mjackson/expect/issues/2/events","html_url":"https://github.com/mjackson/expect/issues/2","id":56513648,"number":2,"title":"Expect function with arguments to throw error","user":{"login":"anton-johansson","id":6347803,"avatar_url":"https://avatars.githubusercontent.com/u/6347803?v=3","gravatar_id":"","url":"https://api.github.com/users/anton-johansson","html_url":"https://github.com/anton-johansson","followers_url":"https://api.github.com/users/anton-johansson/followers","following_url":"https://api.github.com/users/anton-johansson/following{/other_user}","gists_url":"https://api.github.com/users/anton-johansson/gists{/gist_id}","starred_url":"https://api.github.com/users/anton-johansson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anton-johansson/subscriptions","organizations_url":"https://api.github.com/users/anton-johansson/orgs","repos_url":"https://api.github.com/users/anton-johansson/repos","events_url":"https://api.github.com/users/anton-johansson/events{/privacy}","received_events_url":"https://api.github.com/users/anton-johansson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-04T11:14:44Z","updated_at":"2015-02-04T11:14:44Z","closed_at":null,"body":"Hi!\r\n\r\nReally love this project, decided to use it for all my asserts/expectations in my unit tests. I'm quite new to it, though, so this issue might be misplaced. Let me know if this functionality already exists, but I couldn't find any.\r\n\r\nThere is one thing I'm lacking that I noticed existed in another expect framework ([expect.js](https://github.com/Automattic/expect.js)). It is this:\r\n`expect(fn).withArgs(invalid, arg).to.throwException();`\r\n\r\nBecause currently, using this framework, I have to write:\r\n`expect(function () { myFunction(invalidArgument); }).toThrow(/some error message/);`\r\n\r\nIt would be nice if you could write:\r\n`expect(myFunction).withArgs(invalidArgument).toThrow(/some error message/);`\r\n\r\n... or even (however, above is probably more clear):\r\n`expect(myFunction, invalidArgument).toThrow(/some error message/)`\r\n\r\n"}}