lundi 29 janvier 2018

Check unique property value

I have an attribute directive that has a guid as a new property

  export class FieldAuthorizationDirective 
  {
  @Input()
  fieldGuid;
  }

im trying to check with a test if there are multiple elements with the same fieldGuid.

here is my try in app.component.spec but my directives list is always empty :

 it('should check on unique guids', () =>
  {
    const directives = fixture.debugElement.queryAll(By.directive(FieldAuthorizationDirective));


    directives.forEach((data) =>
    {
    });
  });

Aucun commentaire:

Enregistrer un commentaire