I'm just starting out in Mocha, and I'm struggling to figure this one out.
Let's say I have this Node app (app.js):
var myModule = require('./myModule');
function startingPoint() {
myModule.myFunction();
}
and I have a module (myModule.js):
exports.myFunction = function() {
console.log('hello, world');
}
Now, what I'd like to do is test app.js and validate that when I call the function startingPoint, that myModule.myFunction gets called. How would I go about that in Mocha?
Thank you!