{"id":1442,"date":"2026-10-23T18:00:00","date_gmt":"2026-10-23T17:00:00","guid":{"rendered":"https:\/\/wade.one\/blog\/?p=1442"},"modified":"2026-10-23T18:00:00","modified_gmt":"2026-10-23T17:00:00","slug":"a-test-should-be-able-to-disagree-with-the-implementation","status":"publish","type":"post","link":"https:\/\/wade.one\/blog\/2026\/10\/23\/a-test-should-be-able-to-disagree-with-the-implementation\/","title":{"rendered":"A Test Should Be Able to Disagree With the Implementation"},"content":{"rendered":"<p>A test that repeats the implementation can pass while proving very little. If the production code calculates a value and the test copies the same calculation to find the expected value, both can make the same mistake quite happily. I want the test to have a reason to disagree.<\/p>\n<p>For me, that starts with the behaviour somebody depends on. Give it a concrete input and an expected outcome that follows from the requirement. If a bug involved the end of a date range, a repeated request or a missing record, keep that example. It explains why the test exists and gives a future change something meaningful to preserve.<\/p>\n<p>That does not mean every line needs an elaborate test harness. Some changes are better checked by inspecting a render, running an existing integration check or verifying a real output. Building an abstraction purely so a trivial assignment can be tested often adds more code to maintain than the change itself. The check should fit the risk and the uncertainty.<\/p>\n<p>I would rather review a small set of tests with clear failure meanings than a large set that mostly asserts its own setup. A useful failure says which promise broke. A green result should give us a specific reason to trust the behaviour, rather than just another number for a coverage report.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A test that repeats the implementation can pass while proving very little.<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[25],"tags":[118,276,181],"class_list":["post-1442","post","type-post","status-publish","format-standard","hentry","category-software-engineer","tag-code-review","tag-software-quality","tag-testing"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>A Test Should Be Able to Disagree With the Implementation - wade.one<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/wade.one\/blog\/2026\/10\/23\/a-test-should-be-able-to-disagree-with-the-implementation\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"A Test Should Be Able to Disagree With the Implementation - wade.one\" \/>\n<meta property=\"og:description\" content=\"A test that repeats the implementation can pass while proving very little.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wade.one\/blog\/2026\/10\/23\/a-test-should-be-able-to-disagree-with-the-implementation\/\" \/>\n<meta property=\"og:site_name\" content=\"wade.one\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-23T17:00:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wade.one\/blog\/wp-content\/uploads\/2015\/02\/Wade-Logo-cropped.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1518\" \/>\n\t<meta property=\"og:image:height\" content=\"1506\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@wadewomersley\" \/>\n<meta name=\"twitter:site\" content=\"@wadewomersley\" \/>\n<meta name=\"twitter:label1\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/2026\\\/10\\\/23\\\/a-test-should-be-able-to-disagree-with-the-implementation\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/2026\\\/10\\\/23\\\/a-test-should-be-able-to-disagree-with-the-implementation\\\/\"},\"author\":{\"name\":\"\",\"@id\":\"\"},\"headline\":\"A Test Should Be Able to Disagree With the Implementation\",\"datePublished\":\"2026-10-23T17:00:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/2026\\\/10\\\/23\\\/a-test-should-be-able-to-disagree-with-the-implementation\\\/\"},\"wordCount\":230,\"publisher\":{\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/#\\\/schema\\\/person\\\/8b4739f8f8bb2cff5d792d4b8779fcc3\"},\"keywords\":[\"code-review\",\"software-quality\",\"testing\"],\"articleSection\":[\"Software Engineer\"],\"inLanguage\":\"en-GB\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/2026\\\/10\\\/23\\\/a-test-should-be-able-to-disagree-with-the-implementation\\\/\",\"url\":\"https:\\\/\\\/wade.one\\\/blog\\\/2026\\\/10\\\/23\\\/a-test-should-be-able-to-disagree-with-the-implementation\\\/\",\"name\":\"A Test Should Be Able to Disagree With the Implementation - wade.one\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/#website\"},\"datePublished\":\"2026-10-23T17:00:00+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/2026\\\/10\\\/23\\\/a-test-should-be-able-to-disagree-with-the-implementation\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/wade.one\\\/blog\\\/2026\\\/10\\\/23\\\/a-test-should-be-able-to-disagree-with-the-implementation\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/2026\\\/10\\\/23\\\/a-test-should-be-able-to-disagree-with-the-implementation\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/wade.one\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"A Test Should Be Able to Disagree With the Implementation\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/wade.one\\\/blog\\\/\",\"name\":\"wade.one\",\"description\":\"wade womersley - york based software engineer\",\"publisher\":{\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/#\\\/schema\\\/person\\\/8b4739f8f8bb2cff5d792d4b8779fcc3\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/wade.one\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/#\\\/schema\\\/person\\\/8b4739f8f8bb2cff5d792d4b8779fcc3\",\"name\":\"Wade Womersley\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/02\\\/200px.png\",\"url\":\"https:\\\/\\\/wade.one\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/02\\\/200px.png\",\"contentUrl\":\"https:\\\/\\\/wade.one\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/02\\\/200px.png\",\"width\":202,\"height\":200,\"caption\":\"Wade Womersley\"},\"logo\":{\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/02\\\/200px.png\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"A Test Should Be Able to Disagree With the Implementation - wade.one","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/wade.one\/blog\/2026\/10\/23\/a-test-should-be-able-to-disagree-with-the-implementation\/","og_locale":"en_GB","og_type":"article","og_title":"A Test Should Be Able to Disagree With the Implementation - wade.one","og_description":"A test that repeats the implementation can pass while proving very little.","og_url":"https:\/\/wade.one\/blog\/2026\/10\/23\/a-test-should-be-able-to-disagree-with-the-implementation\/","og_site_name":"wade.one","article_published_time":"2026-10-23T17:00:00+00:00","og_image":[{"width":1518,"height":1506,"url":"https:\/\/wade.one\/blog\/wp-content\/uploads\/2015\/02\/Wade-Logo-cropped.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_creator":"@wadewomersley","twitter_site":"@wadewomersley","twitter_misc":{"Estimated reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/wade.one\/blog\/2026\/10\/23\/a-test-should-be-able-to-disagree-with-the-implementation\/#article","isPartOf":{"@id":"https:\/\/wade.one\/blog\/2026\/10\/23\/a-test-should-be-able-to-disagree-with-the-implementation\/"},"author":{"name":"","@id":""},"headline":"A Test Should Be Able to Disagree With the Implementation","datePublished":"2026-10-23T17:00:00+00:00","mainEntityOfPage":{"@id":"https:\/\/wade.one\/blog\/2026\/10\/23\/a-test-should-be-able-to-disagree-with-the-implementation\/"},"wordCount":230,"publisher":{"@id":"https:\/\/wade.one\/blog\/#\/schema\/person\/8b4739f8f8bb2cff5d792d4b8779fcc3"},"keywords":["code-review","software-quality","testing"],"articleSection":["Software Engineer"],"inLanguage":"en-GB"},{"@type":"WebPage","@id":"https:\/\/wade.one\/blog\/2026\/10\/23\/a-test-should-be-able-to-disagree-with-the-implementation\/","url":"https:\/\/wade.one\/blog\/2026\/10\/23\/a-test-should-be-able-to-disagree-with-the-implementation\/","name":"A Test Should Be Able to Disagree With the Implementation - wade.one","isPartOf":{"@id":"https:\/\/wade.one\/blog\/#website"},"datePublished":"2026-10-23T17:00:00+00:00","breadcrumb":{"@id":"https:\/\/wade.one\/blog\/2026\/10\/23\/a-test-should-be-able-to-disagree-with-the-implementation\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wade.one\/blog\/2026\/10\/23\/a-test-should-be-able-to-disagree-with-the-implementation\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/wade.one\/blog\/2026\/10\/23\/a-test-should-be-able-to-disagree-with-the-implementation\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/wade.one\/blog\/"},{"@type":"ListItem","position":2,"name":"A Test Should Be Able to Disagree With the Implementation"}]},{"@type":"WebSite","@id":"https:\/\/wade.one\/blog\/#website","url":"https:\/\/wade.one\/blog\/","name":"wade.one","description":"wade womersley - york based software engineer","publisher":{"@id":"https:\/\/wade.one\/blog\/#\/schema\/person\/8b4739f8f8bb2cff5d792d4b8779fcc3"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wade.one\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":["Person","Organization"],"@id":"https:\/\/wade.one\/blog\/#\/schema\/person\/8b4739f8f8bb2cff5d792d4b8779fcc3","name":"Wade Womersley","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/wade.one\/blog\/wp-content\/uploads\/2015\/02\/200px.png","url":"https:\/\/wade.one\/blog\/wp-content\/uploads\/2015\/02\/200px.png","contentUrl":"https:\/\/wade.one\/blog\/wp-content\/uploads\/2015\/02\/200px.png","width":202,"height":200,"caption":"Wade Womersley"},"logo":{"@id":"https:\/\/wade.one\/blog\/wp-content\/uploads\/2015\/02\/200px.png"}}]}},"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":1502,"url":"https:\/\/wade.one\/blog\/2026\/11\/16\/missing-and-null-need-different-rules-in-a-patch-api\/","url_meta":{"origin":1442,"position":0},"title":"Missing and Null Need Different Rules in a PATCH API","author":"","date":"November 16, 2026","format":false,"excerpt":"Leaving a field out and deliberately clearing it are different requests. A partial-update endpoint needs to preserve that distinction.","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/wade.one\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1399,"url":"https:\/\/wade.one\/blog\/2026\/08\/20\/android-17-lock-free-messagequeue-is-a-real-compatibility-check\/","url_meta":{"origin":1442,"position":1},"title":"Android 17&#8217;s Lock-Free MessageQueue Is a Real Compatibility Check","author":"","date":"August 20, 2026","format":false,"excerpt":"Android 17 improves MessageQueue performance, but apps reflecting into private internals need testing before targeting SDK 37.","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/wade.one\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1161,"url":"https:\/\/wade.one\/blog\/2026\/03\/29\/why-senior-engineers-are-really-paid-for-judgment\/","url_meta":{"origin":1442,"position":2},"title":"Why Senior Engineers Are Really Paid for Judgment","author":"Wade","date":"March 29, 2026","format":false,"excerpt":"Senior engineers are not mainly paid for writing more code. They are paid for making better decisions under constraints, risk, and ambiguity.","rel":"","context":"In &quot;Software Engineer&quot;","block_context":{"text":"Software Engineer","link":"https:\/\/wade.one\/blog\/category\/software-engineer\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1335,"url":"https:\/\/wade.one\/blog\/2026\/06\/03\/claude-code-routines-make-agents-feel-more-like-ci-jobs\/","url_meta":{"origin":1442,"position":3},"title":"Claude Code Routines Make Agents Feel More Like CI Jobs","author":"Wade","date":"June 3, 2026","format":false,"excerpt":"Claude Code routines are interesting because they move coding agents toward scheduled, event-driven, reviewable work.","rel":"","context":"In &quot;AI&quot;","block_context":{"text":"AI","link":"https:\/\/wade.one\/blog\/category\/ai\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1404,"url":"https:\/\/wade.one\/blog\/2026\/08\/25\/a-definition-of-done-is-the-best-coding-agent-prompt\/","url_meta":{"origin":1442,"position":4},"title":"A Definition of Done Is the Best Coding Agent Prompt","author":"Wade","date":"August 25, 2026","format":false,"excerpt":"Coding agents work better when the prompt defines observable completion instead of only describing the code change.","rel":"","context":"In &quot;Software Engineer&quot;","block_context":{"text":"Software Engineer","link":"https:\/\/wade.one\/blog\/category\/software-engineer\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1241,"url":"https:\/\/wade.one\/blog\/2026\/04\/28\/typescript-7-0-beta-makes-performance-the-feature\/","url_meta":{"origin":1442,"position":5},"title":"TypeScript 7.0 Beta Makes Performance the Feature","author":"","date":"April 28, 2026","format":false,"excerpt":"TypeScript 7.0 Beta is interesting because the feature is performance. Faster typechecking and editor feedback can change how a large project feels.","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/wade.one\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/wade.one\/blog\/wp-json\/wp\/v2\/posts\/1442","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wade.one\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wade.one\/blog\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/wade.one\/blog\/wp-json\/wp\/v2\/comments?post=1442"}],"version-history":[{"count":1,"href":"https:\/\/wade.one\/blog\/wp-json\/wp\/v2\/posts\/1442\/revisions"}],"predecessor-version":[{"id":1466,"href":"https:\/\/wade.one\/blog\/wp-json\/wp\/v2\/posts\/1442\/revisions\/1466"}],"wp:attachment":[{"href":"https:\/\/wade.one\/blog\/wp-json\/wp\/v2\/media?parent=1442"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wade.one\/blog\/wp-json\/wp\/v2\/categories?post=1442"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wade.one\/blog\/wp-json\/wp\/v2\/tags?post=1442"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}