I am working on angular 6 I don't have any else statement in my below code.But I am unable to cover branches due to else path not taken .What I need to do to get 100% branch coverage in this case? getHeaderDocumentList(documents: any) { if (documents) { documents.result.docAttachment.forEach(element => { this.headerdocumentdetails.push(element.DocumentUniqueID); }); } } Continue reading...