I\'m in the process of learning Node.js and have been playing around with Express. Really like the framework;however, I\'m having trouble figuring out how to write a unit/i
Change your response object:
var response = { viewName: "" , data : {} , render: function(view, viewData) { this.viewName = view; this.data = viewData; } };
And it will work.