{"action":"created","issue":{"url":"https://api.github.com/repos/jasmine/jasmine/issues/228","repository_url":"https://api.github.com/repos/jasmine/jasmine","labels_url":"https://api.github.com/repos/jasmine/jasmine/issues/228/labels{/name}","comments_url":"https://api.github.com/repos/jasmine/jasmine/issues/228/comments","events_url":"https://api.github.com/repos/jasmine/jasmine/issues/228/events","html_url":"https://github.com/jasmine/jasmine/issues/228","id":4607825,"number":228,"title":"toHaveBeenCalledWith works not with multiple calls","user":{"login":"Sequoia","id":317498,"avatar_url":"https://avatars.githubusercontent.com/u/317498?v=3","gravatar_id":"","url":"https://api.github.com/users/Sequoia","html_url":"https://github.com/Sequoia","followers_url":"https://api.github.com/users/Sequoia/followers","following_url":"https://api.github.com/users/Sequoia/following{/other_user}","gists_url":"https://api.github.com/users/Sequoia/gists{/gist_id}","starred_url":"https://api.github.com/users/Sequoia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sequoia/subscriptions","organizations_url":"https://api.github.com/users/Sequoia/orgs","repos_url":"https://api.github.com/users/Sequoia/repos","events_url":"https://api.github.com/users/Sequoia/events{/privacy}","received_events_url":"https://api.github.com/users/Sequoia/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2012-05-16T16:12:21Z","updated_at":"2016-09-30T17:02:42Z","closed_at":"2012-05-16T17:00:42Z","body":"``` expect($.fn.get).toHaveBeenCalledWith(0,0); ```\nExpected spy get to have been called with [ 0, 0 ] but was called with [ [ 0 ], [ 0 ] ]\n``` expect($.fn.get).toHaveBeenCalledWith([0],[0]); ```\nExpected spy get to have been called with [ [ 0 ], [ 0 ] ] but was called with [ [ 0 ], [ 0 ] ]\n``` expect($.fn.get).toHaveBeenCalledWith([ [0],[0] ]); ```\nExpected spy get to have been called with [ [ [ 0 ], [ 0 ] ] ] but was called with [ [ 0 ], [ 0 ] ]\n\nHow do I work this?  Am I missing something?\n``` $(selector).get(0); ``` is called twice in the function I'm testing.  I know I can check the args directly with argsForCall but I think toHaveBeenCalledWith reads better and is  more appropriate."},"comment":{"url":"https://api.github.com/repos/jasmine/jasmine/issues/comments/250798002","html_url":"https://github.com/jasmine/jasmine/issues/228#issuecomment-250798002","issue_url":"https://api.github.com/repos/jasmine/jasmine/issues/228","id":250798002,"user":{"login":"slackersoft","id":512724,"avatar_url":"https://avatars.githubusercontent.com/u/512724?v=3","gravatar_id":"","url":"https://api.github.com/users/slackersoft","html_url":"https://github.com/slackersoft","followers_url":"https://api.github.com/users/slackersoft/followers","following_url":"https://api.github.com/users/slackersoft/following{/other_user}","gists_url":"https://api.github.com/users/slackersoft/gists{/gist_id}","starred_url":"https://api.github.com/users/slackersoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slackersoft/subscriptions","organizations_url":"https://api.github.com/users/slackersoft/orgs","repos_url":"https://api.github.com/users/slackersoft/repos","events_url":"https://api.github.com/users/slackersoft/events{/privacy}","received_events_url":"https://api.github.com/users/slackersoft/received_events","type":"User","site_admin":false},"created_at":"2016-09-30T17:02:42Z","updated_at":"2016-09-30T17:02:42Z","body":"If you want to check the arguments for multiple calls to your spy, you should use `toHaveBeenCalledWith` multiple times. Jasmine doesn't currently have a way to verify order of calls, and `toHaveBeenCalledWith` will probably never be modified to verify multiple spy invocations in the same matcher call.\r\n\r\nHope this helps. Thanks for using Jasmine!"}}
{"actor":{"display_login":"slackersoft"}}