chore: run format

This commit is contained in:
Vlad Frangu
2025-10-05 16:13:56 +03:00
parent 2a712d4909
commit 8dc1692d87
189 changed files with 3172 additions and 916 deletions

View File

@@ -343,7 +343,10 @@ describe('State transitions', () => {
// Run through a few packet cycles
for (let index = 1; index <= 5; index++) {
expect(player.state.status).toEqual(AudioPlayerStatus.Playing);
if (player.state.status !== AudioPlayerStatus.Playing) throw new Error('Error');
if (player.state.status !== AudioPlayerStatus.Playing) {
throw new Error('Error');
}
expect(player.state.playbackDuration).toStrictEqual((index - 1) * 20);
expect(player.state.missedFrames).toEqual(index - 1);
player['_stepDispatch']();

View File

@@ -79,7 +79,9 @@ describe('demuxProbe', () => {
test('Detects WebM', async () => {
const stream = Readable.from(gen(10), { objectMode: false });
webmWrite.mockImplementation(function mock(data: Buffer) {
if (data[0] === 5) this.emit('head', validHead);
if (data[0] === 5) {
this.emit('head', validHead);
}
} as any);
const probe = await demuxProbe(stream);
expect(probe.type).toEqual(StreamType.WebmOpus);
@@ -89,7 +91,9 @@ describe('demuxProbe', () => {
test('Detects Ogg', async () => {
const stream = Readable.from(gen(10), { objectMode: false });
oggWrite.mockImplementation(function mock(data: Buffer) {
if (data[0] === 5) this.emit('head', validHead);
if (data[0] === 5) {
this.emit('head', validHead);
}
} as any);
const probe = await demuxProbe(stream);
expect(probe.type).toEqual(StreamType.OggOpus);
@@ -99,7 +103,9 @@ describe('demuxProbe', () => {
test('Rejects invalid OpusHead', async () => {
const stream = Readable.from(gen(10), { objectMode: false });
oggWrite.mockImplementation(function mock(data: Buffer) {
if (data[0] === 5) this.emit('head', invalidHead);
if (data[0] === 5) {
this.emit('head', invalidHead);
}
} as any);
const probe = await demuxProbe(stream);
expect(probe.type).toEqual(StreamType.Arbitrary);