I had the following stubs working fine before
sinon.stub(console, 'log', () => {
// Check what the arguments holds
// And either console.info it or do nothing
});
For example, adding console.info(arguments)inside will show me what happened console.log.
With the version, 2xxI switched to callsFake:
sinon.stub(console, 'log').callsFake(() => {
// Check what the arguments holds
// And either console.info it or do nothing
});
Now it works longer. console.info(arguments)it has a bazaar value and has nothing to do with what goes through console.log.
What am I doing wrong?!
source
share