title: Angular 2 tests karma. What exactly to test
body: <p>I am trying to learn how to create tests for angular 2 (typescript files) using karma-jasmine. My doubt is, to test the component.ts files, I only can test the methods that I call at HTML file or I can test all of then?
  For example: I have this model file modal.nota.component.ts </p>
  
  <pre><code>    import { Component, Input, Output, EventEmitter } from '@angular/core';
      import { Nota } from './nota.model'
  
  
      @Component({
        moduleId: module.id,
        selector: 'modal-nota',
        templateUrl: 'modal.nota.component.html'
      })
      export class ModalNotaComponent {
  
        test : boolean = true;
  
        setFalse(test) {
          this.test = false;
          return test;
        }
    }
  </code></pre>
  
  <p>And I don't call the method 'setFalse' in my HTML file, but I want to test him. How can I call and test the method in my spec file? 
  modal.nota.spec.ts</p>
  
  <pre><code>import { ComponentFixture, TestBed } from '@angular/core/testing';
  import { By }              from '@angular/platform-browser';
  import { DebugElement }    from '@angular/core';
  
  import { ModalNotaComponent } from '../modal.nota.component';
  
  describe('Test of test variable', () =&gt; {
  
    let component: ModalNotaComponent;
    let fixture: ComponentFixture&lt;ModalNotaComponent&gt;;
    beforeEach(() =&gt; {
      TestBed.compileComponents(); // ModalNotaComponent test instance
      TestBed.configureTestingModule({
        declarations: [ ModalNotaComponent ], // declare the test component
      });
  
      fixture = TestBed.createComponent(ModalNotaComponent);
      component = fixture.componentInstance;
    });
  
  
    it('Should show that the value of test variable is true', () =&gt; {
      expect(component.test).toBe(true);
    }); 
  
    it('Should test setFalse method', () =&gt; {
      let r = null;
      let t = true;  
      r = component.setFalse(t);
      expect(r).toBe(false);
    }); 
  
  });
  </code></pre>
  
  <p>This test is not working. I am getting this errors
  <a href="https://i.stack.imgur.com/ogJut.png" rel="nofollow noreferrer">photo of the errors</a></p>