And indeed, tests don't take much time to write once you get used to writing them. It's like anything. The more you do it, the better you get at it.
If you’re very familiar with testing and/or doing TDD, you might include your testing costs in your estimate, but you still have the cost to pay. And if you write good testing up front, it will cost more up front.
We have a full continuous integration environment at work, and the tests run there fine, but trying to reproduce that on a local machine is often a fairly difficult experience.
We have maybe 30 components in our system, so often I haven't touched the component before and I am asked to fix a bug in it. Sometimes they are using standard testing libraries, other times there are a lot of extra libraries that I haven't used before. Getting everything to play nicely isn't always trivial.
This drastically scopes down the surface area for CI breaks.
[1] There are a few exceptions for tests that specifically cover environmental config/behavior that cannot be fully tested locally.
> invested heavily
pick one.
But also, testing in browser is more expensive long term that writing proper automated tests. Up front it’s cheaper, like any other technical debt.
Sorry for any confusion for anyone reading my previous comments.
Cake + Eat-it, too.