Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
160 changes: 11 additions & 149 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"@typescript-eslint/parser": "8.38.0",
"babel-loader": "10.0.0",
"babel-plugin-transform-remove-console": "6.9.4",
"chai": "4.5.0",
"chai": "6.0.1",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sinon-chai and chai need to be updated together. The renovate sinon-chai PR (#7563) is also failing because of the peer dependency. sinon-chai should be updated to "4.0.1".

"chart.js": "2.9.4",
"chromedriver": "140.0.2",
"doctoc": "2.2.1",
Expand Down
3 changes: 1 addition & 2 deletions tests/functional/auto/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ const HttpServer = require('http-server');
const streams = require('../../test-streams');
const useSauce = !!process.env.SAUCE || !!process.env.SAUCE_TUNNEL_ID;
const HlsjsLightBuild = !!process.env.HLSJS_LIGHT;
const chai = require('chai');
const expect = chai.expect;
const { expect } = require('chai');

const UA = process.env.UA || 'chrome';
const UA_VERSION = process.env.UA_VERSION || 'latest';
Expand Down
4 changes: 4 additions & 0 deletions tests/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import 'promise-polyfill/src/polyfill';
// Setup global chai for karma-sinon-chai compatibility
import * as chai from 'chai';
import './unit/hls';
import './unit/events';
import './unit/controller/abr-controller';
Expand Down Expand Up @@ -53,3 +55,5 @@ import './unit/utils/texttrack-utils';
import './unit/utils/vttparser';
import './unit/utils/utf8';
import './unit/demuxer/transmuxer';
// eslint-disable-next-line no-restricted-globals
window.chai = chai;
5 changes: 2 additions & 3 deletions tests/unit/controller/abr-controller.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import chai from 'chai';
import { expect, use } from 'chai';
import sinon from 'sinon';
import sinonChai from 'sinon-chai';
import { Events } from '../../../src/events';
Expand All @@ -17,8 +17,7 @@ import type {
MediaPlaylist,
} from '../../../src/types/media-playlist';

chai.use(sinonChai);
const expect = chai.expect;
use(sinonChai);

function levelDetailsWithDuration(duration: number) {
const details = new LevelDetails('');
Expand Down
5 changes: 2 additions & 3 deletions tests/unit/controller/audio-stream-controller.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import chai from 'chai';
import { expect, use } from 'chai';
import sinon from 'sinon';
import sinonChai from 'sinon-chai';
import { hlsDefaultConfig } from '../../../src/config';
Expand Down Expand Up @@ -26,8 +26,7 @@ import type {
MediaPlaylist,
} from '../../../src/types/media-playlist';

chai.use(sinonChai);
const expect = chai.expect;
use(sinonChai);

type AudioStreamControllerTestable = Omit<
AudioStreamController,
Expand Down
5 changes: 2 additions & 3 deletions tests/unit/controller/audio-track-controller.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import chai from 'chai';
import { expect, use } from 'chai';
import sinon from 'sinon';
import sinonChai from 'sinon-chai';
import AudioTrackController from '../../../src/controller/audio-track-controller';
Expand All @@ -21,8 +21,7 @@ import type {
MediaPlaylist,
} from '../../../src/types/media-playlist';

chai.use(sinonChai);
const expect = chai.expect;
use(sinonChai);

type HlsTestable = Omit<
Hls,
Expand Down
5 changes: 2 additions & 3 deletions tests/unit/controller/base-stream-controller.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import chai from 'chai';
import { expect, use } from 'chai';
import sinonChai from 'sinon-chai';
import { hlsDefaultConfig } from '../../../src/config';
import BaseStreamController from '../../../src/controller/stream-controller';
Expand All @@ -11,8 +11,7 @@ import { TimeRangesMock } from '../../mocks/time-ranges.mock';
import type { MediaFragment, Part } from '../../../src/loader/fragment';
import type { BufferInfo } from '../../../src/utils/buffer-helper';

chai.use(sinonChai);
const expect = chai.expect;
use(sinonChai);

type BaseStreamControllerTestable = Omit<
BaseStreamController,
Expand Down
5 changes: 2 additions & 3 deletions tests/unit/controller/buffer-controller-operations.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import chai from 'chai';
import { expect, use } from 'chai';
import sinon from 'sinon';
import sinonChai from 'sinon-chai';
import BufferController from '../../../src/controller/buffer-controller';
Expand All @@ -25,8 +25,7 @@ import type {
import type { BufferAppendingData } from '../../../src/types/events';
import type { MockSourceBuffer } from '../utils/mock-media';

chai.use(sinonChai);
const expect = chai.expect;
use(sinonChai);
const sandbox = sinon.createSandbox();

type HlsTestable = Omit<Hls, 'networkControllers' | 'coreComponents'> & {
Expand Down
Loading
Loading