Open baalexander opened 10 years ago
Good call
I created a base mock module and backend service in this commit, LMK what you think: https://github.com/jeffbcross/ngSocket/commit/beac73ee57c876cc7a34b7f4d991389bfc0bb91a
Your first and third bullets are satisfied with the current implementation, but not the 2nd bullet yet.
This looks good, thanks!
For spying on send calls, is the idea I would inspect pendingSends after calling MockWebSocket's .send()?
Looking forward to being able to fake responses from ngSocketBackend. Any plans to add this in the near future?
It would be awesome if there was something like $httpBackend for mocking WebSocket calls. It looks like you've already started the process with WSMock in your spec file.
Functionality that would be nice: