<p>Before fixing <a href="/daily/2024/01/30/tdd-doesnt-mean-you-know-everything-upfront">yesterday's bug</a>, because I'd written automated tests, I ran them to ensure they were all passing.</p>
<p>Then, I was able to focus solely on adding the new use case - starting with a failing test to replicate the issue and then getting it to pass.</p>
<p>Because it was already tested, I didn't need to worry about breaking any other functionality and introducing regressions.</p>
<p>When the new test was passing, I could run the whole test suite and ensure they still passed and things continued to work.</p>
<p>Without the tests, I'd either need to check everything else manually (which takes time) or worry that something could potentially be broken.</p>
<p>Having tests meant I could be confident that the new and existing functionality worked.</p>
<p>Before fixing <a href="/daily/2024/01/30/tdd-doesnt-mean-you-know-everything-upfront">yesterday's bug</a>, because I'd written automated tests, I ran them to ensure they were all passing.</p>