function setupGet(returnValue){
httpBackend.whenGET(/someRegex/).respond(function(method, url, data, headers, params){
//edit returnValue in the callback
returnValue.url = url; //Error returnValue is undefined
return [200, returnValue];
});
}
It works fine when providing just the returnValue in the respond function, but doing the above doesn't work. I assume since the callback seems to be executed in the browser while returnValue is in protractor, so when the function is executed, returnValue is not defined. Is there a way to accomplish this?
Hello,
Is there a way to accomplish something like this:
It works fine when providing just the
returnValue
in therespond
function, but doing the above doesn't work. I assume since the callback seems to be executed in the browser whilereturnValue
is in protractor, so when the function is executed,returnValue
is not defined. Is there a way to accomplish this?