Skip to content

Add unit tests for getStreamById – not found and archived stream handling #313

@ritik4ever

Description

@ritik4ever

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions