The key thing is focusing on keeping testing simple. I have experienced times where I have wasted more time writing tests than the actual implementation code. That taught me that my code was really complex and forced me to break it down in smaller modular components that were easier to test.
2 red flags I have learned to identify are: - The context to run the module is to complex (DOM emulation, protocol dependency) Leave that to End-2-End testing - Too much time invested on the test framework (Karma, Jasmine, Mocha, Jest) .Keep it simple
I recently wrote an article about this topic :
medium.com/@MarcFly1103/buckle-up-with-tape-1bd5e…
Also you could read: