3

In my angularjs application, I have functionality where I am using SSE in a following way. The code is in a third party library,

var source = new EventSource('usr_management.php');
source.addEventListener('newuser', function(e) {
   // business logic
});

Now I want to mock this in my protractor code I can use httpBackend to mock the request but what is the proper way to return appropriate eventstream response and trigger the event?

Govinda Sakhare
  • 5,009
  • 6
  • 33
  • 74

0 Answers0