Please help me! I have been wrecking my mind but I can not find out how should I stub a variable! Am I wrong? Should I use Spy?
How should I test this code
module.exports = async () => {
var variable = 'something';
var taskProcessor = require('taskprocessor');
try {
taskProcessor(variable).then().catch();
//blah blah
//blah blah
//blah blah
//blah blah
} catch (error) {
console.log(err);
}
};