Don't stub `console.log` in chapter 11
Closed this issue · 4 comments
Type of issue: Feature suggestion
Chapter: 11
Motivation
Stubbing console.log can be confusing to newcomers, as it can mute the output of our tests/gulp tasks if there is a bug in our test (or just a failure in our test). While this is addressed in the tutorial, I think it may be simpler just to eliminate this possibility.
Possible Implementation
Introduce another class DogLogger to abstract away the calls to console.log, then stub out the function on DogLogger instead.
I'm happy to take a stab at this if @verekia / the rest of the community thinks it is a good idea.
I absolutely agree. In v2 I'm stubbing an AJAX call instead. For now there is a note in the tutorial explaining how console.log should not be stubbed already. V2 will be out in the next few weeks :)
word 👍
Fixed by the new release of the tutorial :)