{"action":"created","issue":{"url":"https://api.github.com/repos/domenic/sinon-chai/issues/69","repository_url":"https://api.github.com/repos/domenic/sinon-chai","labels_url":"https://api.github.com/repos/domenic/sinon-chai/issues/69/labels{/name}","comments_url":"https://api.github.com/repos/domenic/sinon-chai/issues/69/comments","events_url":"https://api.github.com/repos/domenic/sinon-chai/issues/69/events","html_url":"https://github.com/domenic/sinon-chai/issues/69","id":106317847,"number":69,"title":"[feature-request] Clean way to test a specific spy call","user":{"login":"jurko-gospodnetic","id":3112833,"avatar_url":"https://avatars.githubusercontent.com/u/3112833?v=3","gravatar_id":"","url":"https://api.github.com/users/jurko-gospodnetic","html_url":"https://github.com/jurko-gospodnetic","followers_url":"https://api.github.com/users/jurko-gospodnetic/followers","following_url":"https://api.github.com/users/jurko-gospodnetic/following{/other_user}","gists_url":"https://api.github.com/users/jurko-gospodnetic/gists{/gist_id}","starred_url":"https://api.github.com/users/jurko-gospodnetic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jurko-gospodnetic/subscriptions","organizations_url":"https://api.github.com/users/jurko-gospodnetic/orgs","repos_url":"https://api.github.com/users/jurko-gospodnetic/repos","events_url":"https://api.github.com/users/jurko-gospodnetic/events{/privacy}","received_events_url":"https://api.github.com/users/jurko-gospodnetic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-09-14T10:55:18Z","updated_at":"2016-02-27T15:57:47Z","closed_at":null,"body":"We can use a construct like:\r\n\r\n```\r\nexpect(mySpy.secondCall).to.have.been.calledWithExactly(...);\r\n```\r\n\r\nand that works, but when that test fails, there is no mention of the fact that it was related to the second call in the test output. In fact, it displays the expected parameters and all the call information, which can get pretty confusing assuming that the expected call was made, just not as the second one.\r\n\r\nIt would be nice if `sinon-chai` gave us a way to cleanly test a specific spy call and report such failures in a way that would not require opening the test code to see what it was that was actually being expected.\r\n\r\nOne idea might be to support something like this:\r\n\r\n```\r\nexpect(mySpy).to.have.call(2).calledWithExactly(...);\r\n```\r\n\r\nbut possibly a solution can be found that would be more like a readable English sentence.\r\n\r\nMany thanks!"},"comment":{"url":"https://api.github.com/repos/domenic/sinon-chai/issues/comments/189673308","html_url":"https://github.com/domenic/sinon-chai/issues/69#issuecomment-189673308","issue_url":"https://api.github.com/repos/domenic/sinon-chai/issues/69","id":189673308,"user":{"login":"vladen","id":7460740,"avatar_url":"https://avatars.githubusercontent.com/u/7460740?v=3","gravatar_id":"","url":"https://api.github.com/users/vladen","html_url":"https://github.com/vladen","followers_url":"https://api.github.com/users/vladen/followers","following_url":"https://api.github.com/users/vladen/following{/other_user}","gists_url":"https://api.github.com/users/vladen/gists{/gist_id}","starred_url":"https://api.github.com/users/vladen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vladen/subscriptions","organizations_url":"https://api.github.com/users/vladen/orgs","repos_url":"https://api.github.com/users/vladen/repos","events_url":"https://api.github.com/users/vladen/events{/privacy}","received_events_url":"https://api.github.com/users/vladen/received_events","type":"User","site_admin":false},"created_at":"2016-02-27T15:57:47Z","updated_at":"2016-02-27T15:57:47Z","body":"+1 vote for this request"}}