Rules Hub
Coding Rules Library
← Back to all rules
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
frontend ruleP2universalStack: javascript
testingmaintenancecoverage
Remove tests only when the behavior they cover is gone
Deleting a test is acceptable when the element/behavior it asserts has itself been removed; otherwise keep the coverage.
PR: hegnar-forum-web · org-mining-hist-2026-06Created: Jun 20, 2026
Bad example
Old codetypescript
| 1 | // removing a test while the feature it covers still exists |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetypescript
| 1 | // the close button was removed, so its test case is also removed |
Explanation (EN)
Objašnjenje (HR)