oliverdavies.uk/content/node.d7be482f-85e8-4b52-8f34-89905f716674.json
2025-05-11 20:02:12 +01:00

100 lines
No EOL
3.7 KiB
JSON

{
"uuid": [
{
"value": "d7be482f-85e8-4b52-8f34-89905f716674"
}
],
"langcode": [
{
"value": "en"
}
],
"type": [
{
"target_id": "daily_email",
"target_type": "node_type",
"target_uuid": "8bde1f2f-eef9-4f2d-ae9c-96921f8193d7"
}
],
"revision_timestamp": [
{
"value": "2025-04-16T14:13: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": "Adding snapshot tests to Build Configs\n"
}
],
"created": [
{
"value": "2023-12-16T00:00:00+00:00"
}
],
"changed": [
{
"value": "2025-04-16T14:13:01+00:00"
}
],
"promote": [
{
"value": false
}
],
"sticky": [
{
"value": false
}
],
"default_langcode": [
{
"value": true
}
],
"revision_translation_affected": [
{
"value": true
}
],
"path": [
{
"alias": "\/daily\/2023\/12\/16\/adding-snapshot-tests-to-build-configs",
"langcode": "en"
}
],
"body": [
{
"value": "\n <p>This week, I've started to add snapshot tests to the <a href=\"https:\/\/www.oliverdavies.dev\/build-configs\">Build Configs project<\/a>.<\/p>\n\n<p>I had unit tests for the DTO validation to ensure the configuration was correct, but the main thing I wanted to test was I could run it for a given configuration file and get the expected files and contents to be generated.<\/p>\n\n<p>With snapshot tests, I generate the files for each configuration and compare them to a set that I know to be correct.<\/p>\n\n<p>If the files match, the tests pass, but, if they don't - such as a bug in the code, the tests will fail.<\/p>\n\n<p>This is the level that I want to be testing this project and that provides the most value.<\/p>\n\n<p>If a snapshot test fails, I can try to replicate the underlying issue in a unit test whilst also fixing the snapshot test.<\/p>\n\n ",
"format": "full_html",
"processed": "\n <p>This week, I've started to add snapshot tests to the <a href=\"https:\/\/www.oliverdavies.dev\/build-configs\">Build Configs project<\/a>.<\/p>\n\n<p>I had unit tests for the DTO validation to ensure the configuration was correct, but the main thing I wanted to test was I could run it for a given configuration file and get the expected files and contents to be generated.<\/p>\n\n<p>With snapshot tests, I generate the files for each configuration and compare them to a set that I know to be correct.<\/p>\n\n<p>If the files match, the tests pass, but, if they don't - such as a bug in the code, the tests will fail.<\/p>\n\n<p>This is the level that I want to be testing this project and that provides the most value.<\/p>\n\n<p>If a snapshot test fails, I can try to replicate the underlying issue in a unit test whilst also fixing the snapshot test.<\/p>\n\n ",
"summary": null
}
],
"feeds_item": [
{
"imported": "2025-04-16T14:13:01+00:00",
"guid": null,
"hash": "f438aefd37b258b1946af9f1abcf9bed",
"target_type": "feeds_feed",
"target_uuid": "90c85284-7ca8-4074-9178-97ff8384fe76"
}
]
}