"value":"\n <p>With unit tests, you need to mock <strong>everything<\/strong>.<\/p>\n\n<p>If what you're testing has a dependency, you need to create and use a mock version.<\/p>\n\n<p>If the mock has its own dependencies, you need to mock those, too.<\/p>\n\n<p>I've written unit tests with mocks and accidentally only tested the mocks instead of the functionality I intended.<\/p>\n\n<h2 id=\"here%27s-the-thing\">Here's the thing<\/h2>\n\n<p>With integration tests, you can use and test the real dependencies.<\/p>\n\n<p>Whilst they may be slightly slower to run, I prefer the simpler setup, less need for mocks, and knowing the real services work - not just the mocked versions.<\/p>\n\n ",
"format":"full_html",
"processed":"\n <p>With unit tests, you need to mock <strong>everything<\/strong>.<\/p>\n\n<p>If what you're testing has a dependency, you need to create and use a mock version.<\/p>\n\n<p>If the mock has its own dependencies, you need to mock those, too.<\/p>\n\n<p>I've written unit tests with mocks and accidentally only tested the mocks instead of the functionality I intended.<\/p>\n\n<h2 id=\"here%27s-the-thing\">Here's the thing<\/h2>\n\n<p>With integration tests, you can use and test the real dependencies.<\/p>\n\n<p>Whilst they may be slightly slower to run, I prefer the simpler setup, less need for mocks, and knowing the real services work - not just the mocked versions.<\/p>\n\n ",