peerjs icon indicating copy to clipboard operation
peerjs copied to clipboard

Unit testing a PeerJS app

Open delucis opened this issue 4 years ago • 2 comments

Does anyone have any good examples of unit testing a PeerJS client app? Is it best just to mock the entire Peer interface or is it possible to mock out the underlying WebRTC layer and have PeerJS run on top of that?

delucis avatar Sep 02 '21 22:09 delucis

This is one possible way to do it:

https://github.com/ambianic/ambianic-ui/blob/master/tests/unit/remote/peer-fetch.spec.js

ivelin avatar Sep 14 '21 04:09 ivelin

Is there a simpler way to test the PeerJS framework?

dweng0 avatar Feb 27 '23 10:02 dweng0