Confused if I should use a fake or a stub?
Quite new to unit testing. I am writing unit tests for my code using Chai+Mocha and Sinon and I am stuck at a point because I am not able to decide whether I should use a Sinon stub or a fake. I have two functions processHash
and processBatch
. processHash
internally calls processBatch
, since I have already written a test case for processBatch
I don’t think it makes sense to test it again when I test processHash