Because your code grows and you make less mistakes. Because it’s often faster for you to write a service and test it in a simple unit-test, rather then going on browser for manual testing.
There are so many articles about why testing is mandatory. Just take my word for it.
This article assumes you thoroughly read: https://guide.meteor.com/testing.html
If you decoupled your code nicely, it’s so easy to write tests:
Now you can easily do in your terminal:
npm run test. Then open your browser on http://localhost:3050 to see the results,
they will be updated live as you write your tests or update your files.
Test files should end in
*.test.js and they should have a parent (not necessarily direct) with name
depending where we want to run them.
Whenever someone does a Pull-Request, you can see if the code breaks some tests or not. This is invaluable, and so easy to implement. Really!
Some good CI tools: