The getStreamById function in streamStore.ts returns null for missing streams and includes progress computation. There are no tests verifying the null path or that archived streams are returned with the correct archived_at field populated.
Implementation:
Valid stream ID → assert full stream object returned with computed progress
Non-existent stream ID → assert null returned, not a thrown error
Archived stream ID → assert archived_at is present and non-null
Verify all computed fields (status, percentComplete, vestedAmount) are present on the returned object
Acceptance Criteria:
Null return for missing ID is tested and does not throw
Archived stream includes archived_at in the response
All progress fields are present on valid stream response
The getStreamById function in streamStore.ts returns null for missing streams and includes progress computation. There are no tests verifying the null path or that archived streams are returned with the correct archived_at field populated.
Implementation:
Valid stream ID → assert full stream object returned with computed progress
Non-existent stream ID → assert null returned, not a thrown error
Archived stream ID → assert archived_at is present and non-null
Verify all computed fields (status, percentComplete, vestedAmount) are present on the returned object
Acceptance Criteria:
Null return for missing ID is tested and does not throw
Archived stream includes archived_at in the response
All progress fields are present on valid stream response