-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Context
The AED status state machine in src/lib/aed-status.ts validates transitions between statuses (DRAFT → PENDING_REVIEW → PUBLISHED → INACTIVE, etc.) but lacks comprehensive unit test coverage.
What needs to happen
- Write unit tests for
validateStatusTransition()covering all valid transitions - Test that invalid transitions are rejected
- Test edge cases (same status → same status, null inputs)
Where to look
src/lib/aed-status.ts— The state machine implementationtests/unit/— Where tests go
Tech
- Vitest (not Jest)
- Follow AAA pattern (Arrange → Act → Assert)
- Test naming:
should[ExpectedBehavior]When[Condition]
Acceptance criteria
- All valid transitions tested
- All invalid transitions tested
- Edge cases covered
- Tests pass with
npm run test:unit
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers