Skip to content

Migrate dependency sinon to v20 #7157

@robwalch

Description

@robwalch

It appears that useFakeXMLHttpRequest is no longer available in sinon v20 causing unit tests to fail https://github.com/video-dev/hls.js/actions/runs/14252348454/job/39947972059

Changes are required to migrate: https://sinonjs.org/releases/v2/migrating-to-2.0/

In Sinon 1.x, the sandbox’ useFakeXMLHttpRequest was the same as its useFakeServer. In 2.x, it maps directly to sinon.useFakeXMLHttpRequest (but with sandboxing). If you use sandbox.useFakeXMLHttpRequest, just replace it with sandbox.useFakeServer, and your tests should behave as they always did.

Originally posted by @robwalch in #7141 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciesPull requests that update a dependency file

    Type

    Projects

    Status

    Nice to have

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions