I am writing jasmine test spec for an angular controller.
Here, I get the error TypeError: 'undefined' is not a constructor (evaluating 'new JdRes()) - though I've defined it as
JdRes = jasmine.createSpy('JdRes');
The code segment in the controller is as follows
function (myService, $scope, $attrs, $q, $parse) {
'use strict';
var JdRes, resource;
JdRes = myService('JdRes');
resource = new JdRes();
}
}in your function? - Joeytje50