I'm trying to mock the https://github.com/mscdex/node-ftp which is designed to create a new instance of a function ("class" constructor design) like the following:
// my-module.js
var Client = require('ftp');
exports.doSomething = function() {
...
var c = new Client();
...
}
I'm trying to mock the https://github.com/mscdex/node-ftp which is designed to create a new instance of a function ("class" constructor design) like the following:
How to achieve this with
sandboxed-module
?