I'm using mocha/chai/sino and I'm new with the three of them.
const a = () => {
b();
}
const b = () => {
console.log('here');
}
In this example I just want to test that b
is been called when calling a
without executing b
.
Something like:
it('test', () => {
const spy = sinon.spy(b);
a();
chai.expect(spy.calledOnce).to.be.true;
})