AngularJS WebSocket Unit Test