Trying to do expect statement on Non-exposed method in node.js..
myfile.js
function main() {
try{
} catch(err) {
a();
}
}
function a() {
return true/false
}
module.exports = {
main:main
}
a()
is not exported its internal to myfile.js. Now my requirement is in test file how can i do expect(a()).to.be.true
. Is it other way to mock this function and do expect statement?. Please share your ideas;