Problem
Only the core cart behavior is covered by tests. Edge cases in config loading, stock limits, and future persistence layers are not tested, risking regressions.
Proposed Change
Expand the test suite to cover invalid config handling, stock limit validation, empty carts, and persistence layer seams. Tests should be deterministic, fast, and have clear failure messages.
Acceptance Criteria
- Tests added for invalid/malformed YAML config
- Tests added for stock limit edge cases (zero, negative, over-ordering)
- Tests added for empty and multi-item carts
- Tests added for persistence layer (create, update, clear)
- All tests run in under 1 second
- Failure messages clearly describe what went wrong
- No flaky tests
Related
Depends on (but not blocking): Issue #7 (Add lint and test automation)
See ROADMAP.md Phase 6 - Production Readiness
Contributor Lane: Testing & Tooling (Issue 8/2)
Difficulty: Easy-Medium
Related Phase: Phase 6 - Production Readiness
Problem
Only the core cart behavior is covered by tests. Edge cases in config loading, stock limits, and future persistence layers are not tested, risking regressions.
Proposed Change
Expand the test suite to cover invalid config handling, stock limit validation, empty carts, and persistence layer seams. Tests should be deterministic, fast, and have clear failure messages.
Acceptance Criteria
Related
Depends on (but not blocking): Issue #7 (Add lint and test automation)
See ROADMAP.md Phase 6 - Production Readiness
Contributor Lane: Testing & Tooling (Issue 8/2)
Difficulty: Easy-Medium
Related Phase: Phase 6 - Production Readiness