I am testing a function. That function has a call to an external module which makes my test fail:
element.funcCall();
Where the function looks like this:
function funcCall() {
external.a.b.c.doSomething();
}
It fails on: undefined is not an object (evaluating 'external.a.b.c.doSomething')
How can I stub or fake this so the call is not really make. I do not need it's functionality for this test.
Aucun commentaire:
Enregistrer un commentaire