I am wiring jasmine test cases for one of the application. I have just started learning jasmine. Below is my script code
var aclChecker = function(app,config) {
validateResourceAccess = function (req, res, next) {
req.callanotherMethod();
res.send(401,'this is aerror message');
}
}
Now i want to spyOn res
and req
object to know if send method has been called.
As req and res are not global variables i am having this doubt on how to create a spy on in junit spec
Please help!!!!!!!!