daily-email: add 2023-05-08
This commit is contained in:
parent
2ba64ad0cd
commit
72f827f052
16
src/content/daily-email/2023-05-08.md
Normal file
16
src/content/daily-email/2023-05-08.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
title: >
|
||||
Only write enough code to get a failing test
|
||||
pubDate: 2023-05-08
|
||||
permalink: >
|
||||
archive/2023/05/08/only-write-enough-code-to-get-a-failing-test
|
||||
tags:
|
||||
- automated-testing
|
||||
- test-driven-development
|
||||
---
|
||||
|
||||
Instead of writing a whole test and then attempting to make it pass, only write enough code to get the test to fail.
|
||||
|
||||
This could be by starting with a failing assertion that is fixed with a hard-coded value and then iterating on the test to introduce the next failure before repeating the process.
|
||||
|
||||
This allows you to keep the feedback loop small and not write more code than is needed, to focus on the objective of the test, and not code yourself into a corner.
|
Loading…
Reference in a new issue