3 ms·
This joke is funny until you need to add unit testing to the project. Then you start to realize that everything needs to sit behind some abstraction.
by self_awareness 3y ago
This joke is funny until you need to add unit testing to the project.
Then you start to realize that everything needs to sit behind some abstraction.
- yen223 3y agoThat moment when you realise all of the complicated nonsense is there only to make unit tests work
- ninetyninenine 3y agoNah. console.log is not really testable. Well from a very pedantic and technical perspective stdout can be tested but overall IO cannot be unit tested. It can be tested via e2e or integration tests meaning you need external factors to verify a side effect occurred.