72 lines
2.7 KiB
YAML
72 lines
2.7 KiB
YAML
uuid:
|
|
- value: 60d29f19-7871-4b8e-a2e5-3bf7edf17c00
|
|
langcode:
|
|
- value: en
|
|
type:
|
|
- target_id: daily_email
|
|
target_type: node_type
|
|
target_uuid: 8bde1f2f-eef9-4f2d-ae9c-96921f8193d7
|
|
revision_timestamp:
|
|
- value: '2025-05-11T09:00:20+00:00'
|
|
revision_uid:
|
|
- target_type: user
|
|
target_uuid: b8966985-d4b2-42a7-a319-2e94ccfbb849
|
|
revision_log: { }
|
|
status:
|
|
- value: true
|
|
uid:
|
|
- target_type: user
|
|
target_uuid: b8966985-d4b2-42a7-a319-2e94ccfbb849
|
|
title:
|
|
- value: 'Automated tests prevent you from adding regressions'
|
|
created:
|
|
- value: '2024-02-02T00:00:00+00:00'
|
|
changed:
|
|
- value: '2025-05-11T09:00:20+00:00'
|
|
promote:
|
|
- value: false
|
|
sticky:
|
|
- value: false
|
|
default_langcode:
|
|
- value: true
|
|
revision_translation_affected:
|
|
- value: true
|
|
path:
|
|
- alias: /daily/2024/02/02/automated-tests-prevent-you-from-adding-regressions
|
|
langcode: en
|
|
body:
|
|
- value: |
|
|
<p>Continuing from <a href="/daily/2024/01/30/tdd-doesnt-mean-you-know-everything-upfront">my last few emails</a>, as well as adding the new use case more easily and quicker, having automated tests also saved me from adding a regression into the code I was changing.</p>
|
|
|
|
<p>I'd written a condition in the query to ensure only results that started with the search term.</p>
|
|
|
|
<p>Initially, I removed it, but then the tests failed.</p>
|
|
|
|
<p>This reminded me why I'd written the condition that way, and I was able to re-add my fix differently.</p>
|
|
|
|
<p>Without the tests, I'd likely have removed it and introduced a regression.</p>
|
|
|
|
<p>Whilst fixing a bug, I'd have introduced a different bug.</p>
|
|
|
|
<p>My tests saved me from doing that and I was able to rectify it quickly before pushing to CI or the staging environment.</p>
|
|
|
|
|
|
format: full_html
|
|
processed: |
|
|
<p>Continuing from <a href="/daily/2024/01/30/tdd-doesnt-mean-you-know-everything-upfront">my last few emails</a>, as well as adding the new use case more easily and quicker, having automated tests also saved me from adding a regression into the code I was changing.</p>
|
|
|
|
<p>I'd written a condition in the query to ensure only results that started with the search term.</p>
|
|
|
|
<p>Initially, I removed it, but then the tests failed.</p>
|
|
|
|
<p>This reminded me why I'd written the condition that way, and I was able to re-add my fix differently.</p>
|
|
|
|
<p>Without the tests, I'd likely have removed it and introduced a regression.</p>
|
|
|
|
<p>Whilst fixing a bug, I'd have introduced a different bug.</p>
|
|
|
|
<p>My tests saved me from doing that and I was able to rectify it quickly before pushing to CI or the staging environment.</p>
|
|
|
|
|
|
summary: null
|
|
field_daily_email_cta: { }
|