apache / cordova-ios

Apache Cordova iOS
https://cordova.apache.org/
Apache License 2.0
2.16k stars 986 forks source link

fix: Error when no simulators are available #1470

Closed dpogue closed 3 months ago

dpogue commented 3 months ago

Platforms affected

iOS

Motivation and Context

Closes GH-526. Closes GH-1366. Closes GH-1377. Closes GH-1469.

Description

Changed getDefaultSimulatorTarget() to reject with an error message when no simulators are found.

This should at least return a useful and actionable error message to the end user, rather than "Cannot read property name of undefined".

Testing

Existing unit tests pass. Added unit test to confirm the function now rejects when no simulators are present.

Checklist

codecov-commenter commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 78.36%. Comparing base (1aea8e7) to head (cc17e9f).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1470 +/- ## ========================================== + Coverage 78.35% 78.36% +0.01% ========================================== Files 16 16 Lines 1825 1826 +1 ========================================== + Hits 1430 1431 +1 Misses 395 395 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.