diff --git a/src/room/CallEventAudioRenderer.test.tsx b/src/room/CallEventAudioRenderer.test.tsx index 4ba24a5e..40b79da4 100644 --- a/src/room/CallEventAudioRenderer.test.tsx +++ b/src/room/CallEventAudioRenderer.test.tsx @@ -55,6 +55,7 @@ beforeEach(() => { (useAudioContext as MockedFunction).mockReturnValue({ playSound, playSoundLooping: vitest.fn(), + soundDuration: {}, }); }); diff --git a/src/room/GroupCallView.test.tsx b/src/room/GroupCallView.test.tsx index 9bc0343b..15ac010e 100644 --- a/src/room/GroupCallView.test.tsx +++ b/src/room/GroupCallView.test.tsx @@ -99,6 +99,7 @@ beforeEach(() => { (useAudioContext as MockedFunction).mockReturnValue({ playSound, playSoundLooping: vi.fn(), + soundDuration: {}, }); // A trivial implementation of Active call to ensure we are testing GroupCallView exclusively here. (ActiveCall as MockedFunction).mockImplementation( @@ -212,6 +213,7 @@ test("GroupCallView plays a leave sound synchronously in widget mode", async () (useAudioContext as MockedFunction).mockReturnValue({ playSound, playSoundLooping: vitest.fn(), + soundDuration: {}, }); const { getByText, rtcSession } = createGroupCallView( diff --git a/src/room/ReactionAudioRenderer.test.tsx b/src/room/ReactionAudioRenderer.test.tsx index 1d963491..f301832e 100644 --- a/src/room/ReactionAudioRenderer.test.tsx +++ b/src/room/ReactionAudioRenderer.test.tsx @@ -70,6 +70,7 @@ beforeEach(() => { (useAudioContext as MockedFunction).mockReturnValue({ playSound, playSoundLooping: vitest.fn(), + soundDuration: {}, }); }); diff --git a/src/useAudioContext.tsx b/src/useAudioContext.tsx index 3e1da48c..59334dda 100644 --- a/src/useAudioContext.tsx +++ b/src/useAudioContext.tsx @@ -75,7 +75,7 @@ function playSoundLooping( let lastSoundPromise: Promise; let nextSoundPromise: Promise; let ac: AbortController | undefined; - void (async () => { + void (async (): Promise => { ac = new AbortController(); // Play a sound immediately lastSoundPromise = Promise.resolve();