I'm novice in jasmine and I need to write some unit tests for node.js app in this framework. I have some problems, one of them is this described below:
var sampleFunction = function(){
var loader = new Loader(params);
// rest of logic here
}
I want to write unit test for sampleFunction
. To do this I need to create spy on Loader
constructor and check what this constructor gets as params and what kind of object is it returning.
Any ideas how to do that? I tried to create spy on Loader.prototype.constructor
but it wasn't a solution to this problem.