Skip to content

Commit 64c40de

Browse files
committed
Update dependency sinon to v21
1 parent d819b45 commit 64c40de

File tree

5 files changed

+16
-13
lines changed

5 files changed

+16
-13
lines changed

package-lock.json

Lines changed: 8 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@
120120
"markdown-styles": "3.2.0",
121121
"micromatch": "4.0.8",
122122
"mocha": "11.7.1",
123+
"nise": "6.1.1",
123124
"node-fetch": "3.3.2",
124125
"npm-run-all2": "8.0.4",
125126
"prettier": "3.6.2",
@@ -129,7 +130,7 @@
129130
"sauce-connect-launcher": "1.3.2",
130131
"selenium-webdriver": "4.35.0",
131132
"semver": "7.7.2",
132-
"sinon": "19.0.5",
133+
"sinon": "21.0.0",
133134
"sinon-chai": "3.7.0",
134135
"typescript": "5.8.3",
135136
"url-toolkit": "2.2.5",

tests/unit/controller/eme-controller.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import chai from 'chai';
22
import { EventEmitter } from 'eventemitter3';
3+
import { fakeXhr } from 'nise';
34
import sinon from 'sinon';
45
import sinonChai from 'sinon-chai';
56
import EMEController from '../../../src/controller/eme-controller';
@@ -149,7 +150,7 @@ const setupEach = function (config) {
149150
};
150151
media = new MediaMock();
151152
emeController = new EMEController(hls as any) as any as EMEControllerTestable;
152-
sinonFakeXMLHttpRequestStatic = sinon.useFakeXMLHttpRequest();
153+
sinonFakeXMLHttpRequestStatic = fakeXhr.useFakeXMLHttpRequest();
153154
};
154155

155156
const getParsedLevelKey = (

tests/unit/controller/error-controller.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import chai from 'chai';
2+
import { fakeServer } from 'nise';
23
import sinon from 'sinon';
34
import sinonChai from 'sinon-chai';
45
import { multivariantPlaylistWithRedundantFallbacks } from './level-controller';
@@ -20,7 +21,7 @@ describe('ErrorController Integration Tests', function () {
2021
let hls: Hls;
2122

2223
beforeEach(function () {
23-
server = sinon.fakeServer.create();
24+
server = fakeServer.create();
2425
setupMockServerResponses(server);
2526
timers = sinon.useFakeTimers({ shouldClearNativeTimers: true } as any);
2627

tests/unit/controller/stream-controller.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* eslint-disable dot-notation */
22
import chai from 'chai';
3+
import { fakeXhr } from 'nise';
34
import sinon from 'sinon';
45
import sinonChai from 'sinon-chai';
56
import { State } from '../../../src/controller/base-stream-controller';
@@ -32,7 +33,7 @@ describe('StreamController', function () {
3233
const mockFragments = mockFragmentArray as MediaFragment[];
3334

3435
beforeEach(function () {
35-
fake = sinon.useFakeXMLHttpRequest();
36+
fake = fakeXhr.useFakeXMLHttpRequest();
3637
hls = new Hls({
3738
// Enable debug to catch callback errors and enable logging in these tests:
3839
// debug: true,

0 commit comments

Comments
 (0)