Reapply "Add daily email for 2024-03-02"

This reverts commit 2a072a5a49.
This commit is contained in:
Oliver Davies 2024-03-04 00:19:25 +00:00
parent 2a072a5a49
commit 2cbe2b9001
3 changed files with 34 additions and 8 deletions

View file

@ -0,0 +1,24 @@
---
title: Are your tests good enough?
date: 2024-03-02
permalink: archive/2024/03/02/are-your-tests-good-enough
tags:
- software-development
- automated-testing
- test-driven-drupal
cta: testing_course
snippet: |
You're about to refactor or add to some existing application code. How confident are you it will work afterwards?
---
You've been asked to add a new feature to or refactor some existing code.
Assuming you have automated tests already (if not, why not?), before you change the code, you should ask whether they're good enough.
They need to be passing, but do you feel confident the existing functionality will still work after you make your changes?
Do you have all the existing use cases covered?
If so, carry on.
If not, spend some time improving your tests first to get that confidence before making any changes.

View file

@ -9,9 +9,9 @@
{% block cta %}
{% if page.cta and site.ctas[page.cta] is defined %}
<p>P.S. {{ site.ctas[page.cta]|raw }}</p>
<p>P.S. {{ site.ctas[page.cta]|raw|markdown }}</p>
{% else %}
<p>P.S. {{ random(site.ctas)|raw }}</p>
<p>P.S. {{ random(site.ctas)|raw|markdown }}</p>
{% endif %}
{% endblock %}
{% endblock %}