PatrickJS / angular-websocket

:arrow_upper_left: The missing Angular WebSocket module for connecting client applications to servers by @AngularClass
https://angularclass.github.io/angular-websocket
MIT License
1.22k stars 194 forks source link

Improved testability of socket code #88

Open VonRehberg opened 8 years ago

VonRehberg commented 8 years ago

I implemented automatical notification of listeners, so that the test code does not need to have access to the productive socket instance to invoke the listeners. Additionally it is now possible to fake a socket close and a message initialized by the backend.

andresgazzoli commented 7 years ago

I was using angular-websocket and when I tried to test my service that use the lib I realized that a lot of functionality was not implemented in the mock. So I started adding them when I bumped into your pull request. I implemented my service's test cases using your mock's version and they run very well. Thanks for sharing your work.

VonRehberg commented 7 years ago

Thanks a lot for your feedback! Hope it will get merged soon :-)

mikedaly commented 6 years ago

This PR is great! I hope this gets some attention and makes it into a release.