-1

I folowed official documentation but i still get some errors regarding that some elements appear to be null.

enter image description here enter image description here

//test

it('should welcome the user', () => {
    fixture.detectChanges();
    //constcontentel.textContent;
    expect(el.textContent).toContain('Welcome', '"Welcome ..."');
    expect(el.textContent).toContain('Test User', 'expected name');
});
Tom
  • 4,257
  • 6
  • 33
  • 49
  • Please refrain from adding code as screenshots. If you expect people to help you then please take the time to help them too by providing _properly formatted and readable code_ to save them time reproducing the issue and helping you out. – Balázs Mar 17 '17 at 09:08

1 Answers1

0

Solution was to call method from instance of component inside of test

comp.NameOfMethod();