How to unit test this function?
private results: Array<any>;
public getPropertyValueByName(propertyName: string): string {
const object = this.results.find(obj => obj.name === propertyName);
if (!!object && object.name === propertyName) {
return object.value;
}
return null;
}
Aucun commentaire:
Enregistrer un commentaire