I have a question about testing a specific situation in Mocha for Node.js. Suppose my application had the following code ...
function a() {
}
function b() {
}
function c() {
if(condition) {
a();
} else {
b();
}
}
If I were to test function c, how could I check if function a or function b was called? Is there any way to do this?
source
share