forcedotcom / salesforcedx-apex

Salesforce Apex Node Library
BSD 3-Clause "New" or "Revised" License
19 stars 25 forks source link

fix: guard against undefined test results #354

Closed peternhale closed 7 months ago

peternhale commented 7 months ago

Account for a undefined ApexTestRunResult when formatting results @W-15298950@ #346

Under certain circumstances an undefined test summary record is passed to function formatAsyncResults. This function assumed that the parameter was always truthy, resulting in an unhandled exception for trying to access the Status (and others) in test summary.

This change implements guards that properly deal with an undefined test summary.