Isolated Unit Tests with Sinonjs
Units in Unit Testing is the smallest unit of code. But how small? Small enough to be tested. For that matter, Unit Tests need to be isolated and for that you need stubs. Here I will use a small function and the Sinonjs to try to test it. My function… »