Таски готовы
This commit is contained in:
@@ -21,7 +21,9 @@ description: "Test documentation template for feature implementation"
|
||||
- [ ] Unit Tests (co-located in `__tests__/` directories)
|
||||
- [ ] Integration Tests (if needed)
|
||||
- [ ] E2E Tests (if critical user flows)
|
||||
- [ ] Contract Tests (for API endpoints)
|
||||
- [ ] Contract Tests (for API endpoints and semantic contract boundaries)
|
||||
- [ ] Semantic Contract Verification (`@PRE`, `@POST`, `@SIDE_EFFECT`, `@DATA_CONTRACT`, `@TEST_*`)
|
||||
- [ ] UX Contract Verification (`@UX_STATE`, `@UX_FEEDBACK`, `@UX_RECOVERY`, `@UX_REACTIVITY`)
|
||||
|
||||
---
|
||||
|
||||
@@ -72,12 +74,14 @@ description: "Test documentation template for feature implementation"
|
||||
|
||||
### ✅ DO
|
||||
|
||||
1. Write tests BEFORE implementation (TDD approach)
|
||||
1. Write tests BEFORE implementation when the workflow permits it
|
||||
2. Use co-location: `src/module/__tests__/test_module.py`
|
||||
3. Use MagicMock for external dependencies (DB, Auth, APIs)
|
||||
4. Include semantic annotations: `# @RELATION: VERIFIES -> module.name`
|
||||
4. Trace tests to semantic contracts and DTO boundaries, not just filenames
|
||||
5. Test edge cases and error conditions
|
||||
6. **Test UX states** for Svelte components (@UX_STATE, @UX_FEEDBACK, @UX_RECOVERY)
|
||||
6. **Test UX contracts** for Svelte components (`@UX_STATE`, `@UX_FEEDBACK`, `@UX_RECOVERY`, `@UX_REACTIVITY`)
|
||||
7. For Complexity 5 boundaries, verify `@DATA_CONTRACT`, invariants, and declared `@TEST_*` metadata
|
||||
8. For Complexity 4/5 Python flows, verify behavior around guards, side effects, and belief-state-driven logging paths where applicable
|
||||
|
||||
### ❌ DON'T
|
||||
|
||||
@@ -86,7 +90,8 @@ description: "Test documentation template for feature implementation"
|
||||
3. Test implementation details, not behavior
|
||||
4. Use real external services in unit tests
|
||||
5. Skip error handling tests
|
||||
6. **Skip UX contract tests** for CRITICAL frontend components
|
||||
6. **Skip UX contract tests** for critical frontend components
|
||||
7. Treat legacy `@TIER` as sufficient proof of test scope without checking actual complexity and contract metadata
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user