Skip to content

Commit e6e69d5

Browse files
committed
Update desktop viewer ICE buffering test for renegotiation behavior
1 parent 6326abf commit e6e69d5

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

apps/desktop/src/renderer/hooks/useWebRTCViewerAPI.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,12 +531,13 @@ describe('useWebRTCViewerAPI', () => {
531531
await Promise.resolve();
532532
});
533533

534-
// After the offer is processed, the buffered candidate should have been drained
534+
// After the offer is processed, buffered candidates from the prior offer context
535+
// are cleared to avoid applying stale mids during renegotiation.
535536
expect(pc.setRemoteDescription).toHaveBeenCalledWith({
536537
type: 'offer',
537538
sdp: 'mock-sdp-offer',
538539
});
539-
expect(pc.addIceCandidate).toHaveBeenCalled();
540+
expect(pc.addIceCandidate).not.toHaveBeenCalled();
540541
});
541542

542543
it('should directly add ICE candidate when remote description exists', async () => {

0 commit comments

Comments
 (0)