title: Angular unit test with private variable
body: <p>I want to write the unit test for the private variable. But Jasmine is not allowing me to use it. Can someone explain me how to do it?</p>
  
  <pre><code>export class TestComponent implements OnInit {
    private resolve;
  
    public testPrivate() {
      this.resolve(false);
    }
  }
  
   it(
        'should test private variable', () =&gt; {
          component.testPrivate();
          expect(component.resolve).toEqual(false);
   });
  </code></pre>