title: How to e2e test multiple client synchronization?
body: <p>I am writing e2e tests where I want to test that when I add an entity on one client, the other online client will be synced and see the added entity. (Think google docs when you type and the words appear on the other users' screens). </p>
  
  <p>My question is: how can I e2e test client synchronization through WebSockets?</p>
  
  <p>Should I mock WebSockets if possible? Should I find an e2e framework that allows multiple tabs/ browser instances and test that the clients sync like that? Is there another way?</p>
  
  <p>I have looked at applications that also use synchronization like these: <a href="https://github.com/automerge/trellis/blob/master/test/application.js" rel="nofollow noreferrer">https://github.com/automerge/trellis/blob/master/test/application.js</a> and <a href="https://github.com/automerge/pixelpusher" rel="nofollow noreferrer">https://github.com/automerge/pixelpusher</a>. Unfortunately, they either don't have tests or don't use WebSockets.</p>