Here are some examples of testing NodeJS with Sinon.
In these examples, I am using sinon@4.5.0 with node v6.14.3
- Use a sandbox because it restores all stubs, spies, timers, etc.
beforeEach(() => {
sandbox = sinon.sandbox.create();
});
Here are some examples of testing NodeJS with Sinon.
In these examples, I am using sinon@4.5.0 with node v6.14.3
beforeEach(() => {
sandbox = sinon.sandbox.create();
});