I had the following stubs running perfectly 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 there, would show me whatever console.log was getting.
With version 2xx I switched to callsFake:
sinon.stub(console, 'log').callsFake(() => {
// Check what the arguments holds
// And either console.info it or do nothing
});
This now longer works. console.info(arguments) has bazaar values, and nothing to do with what console.log is passing.
What am I doing wrong?!