oliverdavies.uk/content/node.e837c37b-a3b6-49bd-9af7-e3bc771c4786.json

91 lines
No EOL
2.7 KiB
JSON

{
"uuid": [
{
"value": "e837c37b-a3b6-49bd-9af7-e3bc771c4786"
}
],
"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:44+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": "Only write enough code to get a failing test\n"
}
],
"created": [
{
"value": "2023-05-08T00:00:00+00:00"
}
],
"changed": [
{
"value": "2025-05-11T09:00:44+00:00"
}
],
"promote": [
{
"value": false
}
],
"sticky": [
{
"value": false
}
],
"default_langcode": [
{
"value": true
}
],
"revision_translation_affected": [
{
"value": true
}
],
"path": [
{
"alias": "\/daily\/2023\/05\/08\/only-write-enough-code-to-get-a-failing-test",
"langcode": "en"
}
],
"body": [
{
"value": "\n <p>Instead of writing a whole test and then attempting to make it pass, only write enough code to get the test to fail.<\/p>\n\n<p>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.<\/p>\n\n<p>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.<\/p>\n\n ",
"format": "full_html",
"processed": "\n <p>Instead of writing a whole test and then attempting to make it pass, only write enough code to get the test to fail.<\/p>\n\n<p>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.<\/p>\n\n<p>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.<\/p>\n\n ",
"summary": null
}
]
}