lundi 11 novembre 2019

I'm looking for a way to test my angular component function through jasmine, but have no idea how to check a simply toggle funcion

  showUserInfo(id: number) {
    this.usuarioSelecionado = id;
    this.mostrarConteudo = this.mostrarConteudo ? false : true;
  }

i'm doing this in spec, trying to pass a boolean value but without success:

it('show more informations about the user', () => {

    expect(this.component.mostrarUsuarioInfo(this.id)).toBe('true')
  });

Aucun commentaire:

Enregistrer un commentaire