From 7225c13748fe6af451ec8b7196509809ad83e6b6 Mon Sep 17 00:00:00 2001 From: kkdev92 <112151103+kkdev92@users.noreply.github.com> Date: Thu, 13 Aug 2026 10:03:09 +0900 Subject: [PATCH] docs: say in CONTRIBUTING that a change comes with a test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Tests section explained how to write a good test — prove it fails against the unfixed code, do not verify a rule with the same rule — but never said that a change should bring one. The habit is universal here and the suite has grown with every behavioural change; it was simply not written down. The other three extensions in this account already state it ("New behaviour needs a test"), so this is the odd one out rather than a new rule. Named the destination too, since "which suite" is the question that follows: pure logic mirrors its path under tests/, and anything that depends on what VS Code actually does with a handler belongs in fixtures/extension-host — which is the distinction that caught the fire-and-forget semantics of handleTextEditor. Verified: quality. Co-Authored-By: Claude Opus 5 --- CONTRIBUTING.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 94767bd..55cae8d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -120,6 +120,10 @@ missing a method. ## Tests +**New behaviour needs a test, and so does a fix.** Pure logic goes in the suite +that mirrors its path under `tests/`; anything that depends on what VS Code +actually does with a handler belongs in `fixtures/extension-host`. + A test is worth having only if it fails when the behaviour is wrong. Two habits this repo enforces: