angular / ngSocket

WebSocket support for angular
Apache License 2.0
204 stars 25 forks source link

fix(ngWebSocket): Add annotation for minified ngWebSocket factory #8

Closed lord2800 closed 10 years ago

lord2800 commented 10 years ago

The ngWebSocket factory depends on the ngWebSocketBackend service, but doesn't declare this dependency in the annotation array. This commit fixes that problem.

Closes #7.

lord2800 commented 10 years ago

I'm unsure of how to add a test for this, or I'd have added a test to go with this.

jeffbcross commented 10 years ago

Thanks, I actually fixed this with another commit: https://github.com/jeffbcross/ngSocket/commit/ea67f7aabb9f6afaf56866830d36264eba7bc694

It should've made tests fail, except I'd made a mistake in my tests by assigning the mock backend to a global variable called ngWebSocketBackend. I scoped the variable to make tests fail, then injected the service to make them pass again.