I had heard the hype about unit testing for a while, and had even practised Test-Driven-Development* on my work before, but I never dove seriously into it.
Well that was going to change at some point, and I'm glad it did now.
I worked with a well-made Go repository the other weekend, and I was very impressed at how much peace of mind unit testing brought. My typical way of building robust code is actually doing a form of manual unit testing, where I test individual blocks of code with the likes of
fmt.printLn, and observe the feedback in errors/lack thereof.
In retrospect this is a very silly decision because I'm a human not a computer and I shouldn't do a computer's job.
Long story short, I'm diving in today.
I've talked to a number of very qualified developers and identified that one of the best testing tools is Cypress.io. A quick journey through their 'Writing Your First Test' page definitely has me sold. This is a powerful tool.
*Test-Driven-Development: where you develop something not by writing code first, but a test first. Helps you not write bugs.