oliverdavies.uk/source/_daily_emails/2023-09-29.md

37 lines
1.2 KiB
Markdown
Raw Normal View History

2024-01-03 20:00:00 +00:00
---
title: >
2024-02-07 20:01:19 +00:00
92 changed files with 885 additions and 156 deletions
2024-01-03 20:00:00 +00:00
pubDate: 2023-09-29
permalink: >-
2024-02-07 20:01:19 +00:00
archive/2023/09/29/92-changed-files-with-885-additions-and-156-deletions
2024-01-03 20:00:00 +00:00
tags:
2024-02-07 20:01:19 +00:00
- software-development
- automated-testing
- test-driven-development
- refactoring
2024-01-03 20:00:00 +00:00
---
Today, I refactored some code on a client's Drupal project I've been working on.
This is what the commit says:
> Showing 92 changed files with 885 additions and 156 deletions
So, it's not a small refactor.
As I worked on the custom modules needed for the site, I noticed that some common functionality was spread over multiple modules. This refactor moved that functionality into its own module, which is now a dependency of the others.
The code is better, and the responsibilities of the modules are clearer.
Whilst a large amount of those additions are adding test modules with test configuration, it's not a small refactor.
## Here's the thing
This is what it says at the bottom of the CI pipeline output:
> OK (79 tests, 565 assertions)
This is the same number of passing tests and assertions I had before I started the refactor, so I know the functionality still works.
If I didn't have those tests, I wouldn't have done the refactor.