@webex/internal-plugin-mercury 3.0.0-beta.40 → 3.0.0-beta.401

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -809,6 +809,23 @@ describe('plugin-mercury', () => {
809
809
  reason: 'Pong mismatch',
810
810
  });
811
811
  });
812
+
813
+ it('emits ping pong latency correctly', () => {
814
+ const spy = sinon.spy();
815
+
816
+ socket.on('ping-pong-latency', spy);
817
+
818
+ socket._ping(123);
819
+ mockWebSocket.emit('message', {
820
+ data: JSON.stringify({
821
+ type: 'pong',
822
+ id: 123,
823
+ }),
824
+ });
825
+
826
+ assert.calledWith(spy, 0);
827
+ assert.calledOnce(spy);
828
+ });
812
829
  });
813
830
  });
814
831
  });