title: TypeScript test properties of object created within a component's method
body: <p>I would like to test a component method.
  I would like to inspect an object that is created within that method as it is passed to another method.</p>
  
  <p>I have a component with a method described like so:</p>
  
  <pre><code>submit() {
  
      const goal= new Goal();
      if(component.property == true){
          goal.myProperty ='reached';
      } else { 
          goal.myProperty =' not reached';
  
      create(goal);
  }
  </code></pre>
  
  <p>I would like to inspect the goal.myProperty property as it is being passed to create() method.</p>