I have this js module (simplified example):
var dbLoader = require('dbLoader');
function MyModule() {
this.build(){
return dbLoader.load('yipee');
}
}
module.exports = MyModule;
How on earth do I spyOn(dbLoader,'load') ??
Because when I try I get the error
spyOn could not find an object to spy upon for load()
Any help much appreciated...