diff --git a/src/state/CallViewModel/localMember/LocalMember.test.ts b/src/state/CallViewModel/localMember/LocalMember.test.ts index 76c0f4a8..8990b46b 100644 --- a/src/state/CallViewModel/localMember/LocalMember.test.ts +++ b/src/state/CallViewModel/localMember/LocalMember.test.ts @@ -429,7 +429,6 @@ describe("LocalMembership", () => { await publishResolver.promise; publishing$.next(true); }), - publishing$, }; publishers.push(p as unknown as Publisher); diff --git a/src/state/CallViewModel/localMember/Publisher.test.ts b/src/state/CallViewModel/localMember/Publisher.test.ts index 0bb97797..dd8117a3 100644 --- a/src/state/CallViewModel/localMember/Publisher.test.ts +++ b/src/state/CallViewModel/localMember/Publisher.test.ts @@ -208,6 +208,13 @@ describe("Publisher", () => { expect(createTracksSpy).not.toHaveBeenCalled(); }); + it("should unsetHandler and stop tracks on destroy", async () => { + await publisher.destroy(); + expect(publisher.stopTracks).toHaveBeenCalled(); + expect( this.muteStates.audio.unsetHandler(); + this.muteStates.video.unsetHandler();).toHaveBeenCalled(); + }); + it("Should minimize permission request by querying create at once", async () => { const enableCameraAndMicrophoneSpy = vi.spyOn( localParticipant,