Skip to content

Commit

Permalink
review - fix tests using private membershipManager props
Browse files Browse the repository at this point in the history
  • Loading branch information
toger5 committed Jan 9, 2025
1 parent df3c47e commit 35b7db8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/unit/matrixrtc/MatrixRTCSession.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -485,10 +485,10 @@ describe("MatrixRTCSession", () => {
// needed to advance the mock timers properly
// depends on myMembershipManager being created
const scheduledDelayDisconnection = new Promise<void>((resolve) => {
const myMemManager = (sess as any).myMembershipManager;
const originalFn: () => void = myMemManager.scheduleDelayDisconnection;
myMemManager.scheduleDelayDisconnection = jest.fn(() => {
originalFn.call(myMemManager);
const membershipManager = (sess as any).membershipManager;
const originalFn: () => void = membershipManager.scheduleDelayDisconnection;
membershipManager.scheduleDelayDisconnection = jest.fn(() => {
originalFn.call(membershipManager);
resolve();
});
});
Expand Down

0 comments on commit 35b7db8

Please sign in to comment.