title: jasmine doesn’t continue executing the code in subscribe callback once unsubscribe is invoked
body: <p>I've used these stackblitz:</p>
  
  <p><a href="https://stackblitz.com/edit/dialog-example" rel="nofollow noreferrer">https://stackblitz.com/edit/dialog-example</a></p>
  
  <p><a href="https://stackblitz.com/edit/jasmine-testing" rel="nofollow noreferrer">https://stackblitz.com/edit/jasmine-testing</a></p>
  
  <p>and I've merged in this one:</p>
  
  <p><a href="https://stackblitz.com/edit/jasmine-testing-r6bpfh" rel="nofollow noreferrer">https://stackblitz.com/edit/jasmine-testing-r6bpfh</a></p>
  
  <p>The example can be executed as in dialog-example stackblitz, setting TEST variable to false in main.ts, and so it can be checked that the expected behaviour is fullfilled: the dialogIsOpen variable is false after closing the dialog.</p>
  
  <p>While testing I've mocked the dialog, so the afterClose event is fired inmediatly, but then the code beyond the unsubscribe call is not being executed. This can be checked changing the unsubscribe call and put after the <code>dialogIsOpen = false;</code> line. Then the line is executed, but not the rest of the function.</p>
  
  <p>Is this a bug? Should I not to unsubscribe from the event? </p>