I have this weird issue where i'm passing a function to the addMockModule argument and it is being returned as a string in the form of:
functionName: "functionlogic"
Static references such as variables work fine. This is the code:
var x = function sayHello() {console.info('Say hello!')}
browser.addMockModule('moduleName', function(x) {
function runBlock(){$httpBackend) {
console.info(x); // returns x function as a string
x(); //returns unknown error: x is not a function
}
angular.module('moduleName', ['ngMockE2E', 'myApp'])
.run(runBlock);
runBlock.$inject = ['$httpBackend'];
}, x);