I have a Backbone Collection and I need to pass some parameters to the .fetch({data : {gender : ‘male’}}). Is there a way to test with jasmine that the parameters are passed?
thanks in advance
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could probably achieve that by using the method in the example below.
Please note that, the below code will intercept the fetch-call and return, the call will not reach the server. If you would like to have the server-side emulation, then you would need to use Sinon or some other such similar methods.