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: typescript
testingnamingreadabilityclean-code
Name test cases by the function under test, not by the exact expected value
Keep test names focused on the behavior/function being tested rather than embedding the specific literal value asserted.
PR: hegnar-web · org-mining-hist-2026-06Created: Jun 19, 2026
Bad example
Old codetypescript
| 1 | test('rawDate() returns the expected format "2024-01-10T11:02:35+01:00"', () => { /* ... */ }); |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetypescript
| 1 | test('rawDate', () => { /* ... */ }); |
Explanation (EN)
Objašnjenje (HR)