Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved testability of socket code #88

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

VonRehberg
Copy link

@VonRehberg VonRehberg commented Jul 5, 2016

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
Copy link

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
Copy link
Author

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

@mikedaly
Copy link

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

@@ -1,8 +1,8 @@
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define(['module', 'angular'], factory);
define(["module", "angular"], factory);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why the quoting style changed. Single-quote seems to be more standard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants