20
Is it okay to leave tests in your code?
(programming.dev)
This is a place where you can ask any programming / topic related to the instance questions you want!
For a more general version of this concept check out [email protected]
Icon base by Lorc under CC BY 3.0 with modifications to add a gradient
(Guessing JS / TS) I look after a moderately sized app, and still find
console.log()
useful sometimes. They are all protected by a Boolean, so we haveauthLog && console.log('something about auth')
and the bools are all set in one global file. So turning debug logging on and off is very simple.The best thing is that when it's off, the bundler strips all the console log lines from the source, so they're not even there-but-inactive in production.