hls.js
hls.js copied to clipboard
Migrate dependency sinon to v20
- #7141
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 https://github.com/video-dev/hls.js/issues/7141#issuecomment-2779549715