uuid: - value: 792953b8-b5f7-44dc-8e32-d70629bf06a4 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:01+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: 'Writing more tests than production code' created: - value: '2025-02-08T00:00:00+00:00' changed: - value: '2025-05-11T09:00:01+00:00' promote: - value: false sticky: - value: false default_langcode: - value: true revision_translation_affected: - value: true path: - alias: /daily/2025/02/08/more-tests langcode: en body: - value: |

As well as having less code than you started with, another good type of change is one where there are tests accompanying the production code.

Whether the tests were written after the code or before with a test-driven development approach, the main thing is that there are tests when the code is committed.

There should also be more test code than production code.

There is only one implementation of the production code, but there should be multiple tests for it.

There should be different tests for different situations, such as different types of input and no input, testing for throwing Exceptions and other failure cases and not just the "happy path".

Looking at the diff of a commit or merge request, there should be more changes to the test then the code it's testing.

format: full_html processed: |

As well as having less code than you started with, another good type of change is one where there are tests accompanying the production code.

Whether the tests were written after the code or before with a test-driven development approach, the main thing is that there are tests when the code is committed.

There should also be more test code than production code.

There is only one implementation of the production code, but there should be multiple tests for it.

There should be different tests for different situations, such as different types of input and no input, testing for throwing Exceptions and other failure cases and not just the "happy path".

Looking at the diff of a commit or merge request, there should be more changes to the test then the code it's testing.

summary: null field_daily_email_cta: { }