Skip to content

refactor(downloads): make post-create validation delay testable #24

Description

@atldays

Problem

download() waits for a hard-coded 100 ms timeout before validating the created download item. Framework-agnostic tests cannot control that delay without runner-specific fake timers, and the testing kit must not depend on Jest, Rstest, Vitest, Sinon, or similar libraries.

Proposed follow-up

Introduce a narrow scheduler or delay seam in production code, preserving runtime behavior while allowing deterministic tests to substitute the wait.

Until this follow-up is implemented, testing-kit integration coverage should keep only the necessary real-time success and BlockDownloadError scenarios and document that wall-clock timing is not deterministic.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions