From 39205efe0defa5d5a49ea6220a9f8563f29e7247 Mon Sep 17 00:00:00 2001 From: "Brian R. Bondy" Date: Mon, 1 Jun 2026 16:55:58 -0400 Subject: [PATCH] Exempt trivial UI from TI-039 test coverage best practice (#36901) --- docs/best-practices/testing-isolation.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/best-practices/testing-isolation.md b/docs/best-practices/testing-isolation.md index c53c5062eac..8f1a850a5b1 100644 --- a/docs/best-practices/testing-isolation.md +++ b/docs/best-practices/testing-isolation.md @@ -764,6 +764,10 @@ ensure that new logic, branches, and edge cases have corresponding tests. This applies to all PRs, not just bug fixes. Don't be overly strict — use judgment — but flag obvious gaps where meaningful test coverage is missing. +**Exception:** Don't require a dedicated test when the change is trivial UI with +no meaningful logic to test (e.g. a toggle wired to a pref), or when it follows +an existing untested pattern in the surrounding code. + **If code is difficult to test, suggest refactors that improve testability** rather than accepting untested code. Common refactors include extracting logic into pure functions, adding dependency injection, or separating I/O from