I am learning how to write tests in Javascript and I want to be clear on some things. Please permit me because I'm completely new to the TDD game.
I have a blue button that when clicked performs an action. I have manually tested the button by clicking on it with the mouse and I can confirm that the operation it was meant to perform was actually performed. So, what then is the extra benefit of writing tests to check if the click on the button worked even though I've manually tested for that?
If a programmer is imperfect enough to write bad code, is there any chance he will write better tests. Won't there be bias?
Is it necessary I test every single function in my code?
Sometimes I see quite alot of bugs even in big tech company apps. I believe they wrote tests, yet such bugs were still shipped to production. Does it mean their engineers didn't test enough before deployment?
Thanks