Write tests. Not too many. Mostly integration
&gt; You should very rarely have to change tests when you refactor code.<p>I&#x27;m going to say this is poor, if not outright dangerous, advice. I&#x27;d argue the opposite: every time the code changes, it would be great if a test somewhere broke.<p>Hell, if the tests originally were for a gigantic class with a ton of mocks but the code changed so there was lower coupling and the dependencies were injectable or separated in different modules, the tests <i>should</i> be changed.<p>&gt; even a strongly typed language should have tests<p>Indeed, yet I&#x27;ve seen so many people in the strong typing &quot;camp&quot; mentioning &quot;the compiler catches some bugs right away!&quot; as an advantage, which always makes me think &quot;... and?&quot;<p>&gt; It doesn’t matter if your button component calls the onClick handler if that handler doesn&#x27;t make the right request with the right data!<p>... But there should be another unit test for that handler, checking that it&#x27;s using the right request with the right data.<p>In general, I agree with some points and disagree on others.