You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I think I am running into a similar Issue here. I have a mocked call which in itself does a $.ajax to retrieve some data. In the .done() callback from the inner $.ajax I set this.responseText to the value returned by the call.
$.mockjaxurl:"something"response: (settings) ->$.ajax(
type:'GET'url:'internet_somewhere'dataType:'json'
).done((data) =>#this is the right object here due to coffee script '=>'this.responseText= data
)
If I call this mock, it returns instantly with a value of undefined instead of waiting for responseText to be set. I also tried setting async:false on the mock / inner ajax / mock caller, all to no avail.
Am I doing something wrong or is this a real issue?
The text was updated successfully, but these errors were encountered:
This solve the issues presented in both #93 and #134 without changing existing behavior.
The usage would include just adding a second paramater to your response function callback. When present, mockjax would wait for it to be called before finishing the request.
See the new test for an example.
Hi, I think I am running into a similar Issue here. I have a mocked call which in itself does a$.ajax to retrieve some data. In the .done() callback from the inner $ .ajax I set this.responseText to the value returned by the call.
If I call this mock, it returns instantly with a value of undefined instead of waiting for responseText to be set. I also tried setting async:false on the mock / inner ajax / mock caller, all to no avail.
Am I doing something wrong or is this a real issue?
The text was updated successfully, but these errors were encountered: