"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 ",