0

I'm considering migration from pusher to ably.

In my current setup, I'm using https://github.com/tristandunn/pusher-fake as a solution to run integration tests. In short, this is running local server, which is faking real pusher server. This allows to run integration tests, including realtime communication, with ease as there is no stubbing requests.

I can't find anything like this for ably, unfortunately. But there seems to be no go-to solution even.

What is a best way for writing integration tests with ably?

Some ideas that comes to my mind:

  • write fake server (something like pusher-fake) on my own BUT it's a lot of work
  • stub requests to ably BUT should I somehow stub websocket messages :O
  • request actual ably server BUT this is error prone because it make specs network dependent
Piotr Pawlik
  • 103
  • 8

1 Answers1

0

The best way would be writing the fake server and releasing it back to the community (as the author of pusher-fake did). To stub requests you'd need to use a programmable proxy like puffing-billy since requests are made directly from the browser.

Thomas Walpole
  • 48,548
  • 5
  • 64
  • 78