Check elements html spec Angular2

0

I want to check that I have 4 li > inside an ul > , besides the li, there are other labels, but they do not interest me.

it('checked four elements <li>', async(() => {
    const ul: HTMLElement = fixture.debugElement.nativeElement.querySelector('ul');
    expect(ul.querySelectorAll('li')).toContain(4);
  }));

I get the Expected Object error

    
asked by EduBw 19.04.2018 в 13:55
source

0 answers