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).
fullstack ruleP2universalStack: javascript
testingduplicationcleanliness
Remove duplicated assertion lines in tests
Identical consecutive assertions add no coverage; keep one. Watch for copy-paste duplication when editing test blocks.
PR: frontpage-web · org-mining-hist-2026-06Created: Jun 18, 2026
Bad example
Old codejavascript
| 1 | should(tip.find('a').length).be.equal(1); |
| 2 | should(tip.find('a').length).be.equal(1); |
Explanation (EN)
Objašnjenje (HR)
Good example
New codejavascript
| 1 | should(tip.find('a').length).be.equal(1); |
Explanation (EN)
Objašnjenje (HR)