spying upon a global function using jasmine-node
问题 I am using jasmine-node to do unit testing on javascript code. I have a number of global functions which I would like to spyOn and allow the call to make it though to the original implementation. See the code below as an example. For a reason I cannot explain, I am seeing an error "globalFunction() method does not exist". Can someone tell me why jasmine is not able to find this globalFunction method which I understand to be in global scope. I appreciate the help var globalFunction = function(