diff --git a/node/src/tests/test-WebRtcServer.ts b/node/src/tests/test-WebRtcServer.ts index 3d1bc52855..796c923d5b 100644 --- a/node/src/tests/test-WebRtcServer.ts +++ b/node/src/tests/test-WebRtcServer.ts @@ -356,7 +356,9 @@ test('router.createWebRtcTransport() with webRtcServer succeeds and transport is const transport = await router.createWebRtcTransport( { webRtcServer, - appData : { foo: 'bar' } + // Let's disable UDP so resulting ICE candidates should only contain TCP. + enableUdp : false, + appData : { foo: 'bar' } }); await expect(router.dump()) @@ -373,17 +375,12 @@ test('router.createWebRtcTransport() with webRtcServer succeeds and transport is const iceCandidates = transport.iceCandidates; - expect(iceCandidates.length).toBe(2); + expect(iceCandidates.length).toBe(1); expect(iceCandidates[0].ip).toBe('127.0.0.1'); - expect(iceCandidates[0].port).toBe(port1); - expect(iceCandidates[0].protocol).toBe('udp'); + expect(iceCandidates[0].port).toBe(port2); + expect(iceCandidates[0].protocol).toBe('tcp'); expect(iceCandidates[0].type).toBe('host'); - expect(iceCandidates[0].tcpType).toBeUndefined(); - expect(iceCandidates[1].ip).toBe('127.0.0.1'); - expect(iceCandidates[1].port).toBe(port2); - expect(iceCandidates[1].protocol).toBe('tcp'); - expect(iceCandidates[1].type).toBe('host'); - expect(iceCandidates[1].tcpType).toBe('passive'); + expect(iceCandidates[0].tcpType).toBe('passive'); expect(transport.iceState).toBe('new'); expect(transport.iceSelectedTuple).toBeUndefined();