title: Testing focusElement in angular 2 with karma+jasmine
body: <p>How to write correct test in angular 2 with karma + jasmine for this public:</p>
  
  <pre><code>public focusElement(element: HTMLElement, event: Event): void {
      element.focus();
      event.stopPropagation();
      event.preventDefault();
  }
  </code></pre>
  
  <p>I start with this: </p>
  
  <pre><code>describe("LoginComponent", () =&gt; {
      describe("function focusElement(): void", () =&gt; {
          let testLoginComponent: LoginComponent;
          beforeEach(() =&gt; {
              testLoginComponent = new LoginComponent(null, null);
          });
          // test 
          });
      });
  });
  </code></pre>
  
  <p>But i really understand how to write correct test for this func. </p>