title: Unit testing Jasmine Typescript, splitting concerns
body: <p>I've made a hello world app at the moment which fetches the string "hello world" from my API when a button is pressed.</p>
  
  <p>I have some experience with unit testing and was wondering whether I am separating concerns correctly.</p>
  
  <p>The tests I plan on doing are:</p>
  
  <ol>
  <li>Test that the button click calls the GET method just once.</li>
  <li>Test that the function returns the string hello world.</li>
  </ol>
  
  <p>So the questions I have are:</p>
  
  <ol>
  <li>Is it possible to check how many times functions are called?</li>
  <li>The controller where the function is implemented is in typescript in a separate file, can someone point me in the correct direction to test typescript controller functions and also how to write jasmine tests in TS.</li>
  </ol>
  
  <p>Thanks,</p>