Jasmine不承认Pusher.unsubscribe

时间:2015-12-11 22:31:21

标签: angularjs jasmine karma-jasmine

如果频道名称未知,如何查找pusher是否订阅频道?显然,Jasmine并不是这样知道的:

 subscribe: function(booking_request_id) {
      if(channel && pusher) pusher.unsubscribe(); // error :  not implemented thrown
      channel = pusher.subscribe('booking_requests_' + booking_request_id);
      channel.bind('async_notification', function (data) {
         $rootScope.$apply(function () {
         callback(data);
        });
      });
    }

0 个答案:

没有答案