Skip to content

docs: say in CONTRIBUTING that a change comes with a test - #33

Merged
kkdev92 merged 1 commit into
mainfrom
docs/state-the-test-requirement
Aug 13, 2026
Merged

docs: say in CONTRIBUTING that a change comes with a test#33
kkdev92 merged 1 commit into
mainfrom
docs/state-the-test-requirement

Conversation

@kkdev92

@kkdev92 kkdev92 commented Aug 13, 2026

Copy link
Copy Markdown
Owner

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, and the other three extensions in this
account already state it ("New behaviour needs a test"), so this repository was
the odd one out rather than the strict one.

Why name the destination

"Which suite" is the question that immediately follows. Pure logic mirrors its
path under tests/; anything that depends on what VS Code actually does with a
handler belongs in fixtures/extension-host.

That distinction is not academic — it is what caught handleTextEditor being
fire-and-forget, which the fake had been happily awaiting.

Context

Found while answering the OpenSSF Best Practices criteria, where test_policy
asks whether the requirement is documented. It was the only one of the four
repositories that could not answer yes.

Verification

quality.

🤖 Generated with Claude Code

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 <noreply@anthropic.com>
@kkdev92
kkdev92 merged commit 1ea93ab into main Aug 13, 2026
10 checks passed
@kkdev92
kkdev92 deleted the docs/state-the-test-requirement branch August 13, 2026 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant