task_receipts/docs/testing-rules.md
2025-06-14 18:04:05 -05:00

4 lines
465 B
Markdown

# Testing and Code Quality Rules
- **No non-null assertions**: Non-null assertions (the `!` operator) are a hack for missing null checks or extraneous null types. Always use proper null checks and handle possible null/undefined values explicitly.
- **Do not throw errors within tests**: Use proper test assertions (e.g., `expect(value).not.toBeNull()`) instead of throwing errors from within tests. This ensures test failures are reported clearly and consistently.