Repository navigation
Add tests for SdkManager - #6040
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6040 +/- ##
==========================================
+ Coverage 69.58% 69.93% +0.34%
==========================================
Files 171 171
Lines 12958 12958
Branches 2590 2590
==========================================
+ Hits 9017 9062 +45
+ Misses 3451 3406 -45
Partials 490 490 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review
This pull request introduces a comprehensive test suite for the SdkManager, covering SDK searching, version sorting, and configuration updates for both Dart and Flutter. The review feedback highlights opportunities to improve type safety by refining type casts in test stubs and suggests a more user-friendly descending sort order for SDK versions in the selection picker.
| assert.deepStrictEqual(items.map((item) => item.label), [ | ||
| "Auto-detect SDK location", | ||
| "Dart SDK 2.19.0", | ||
| "Dart SDK 3.0.0", | ||
| "Dart SDK 3.1.0", | ||
| ]); |
There was a problem hiding this comment.
The test confirms that SDK versions are sorted in ascending order. However, for a better user experience in the SDK picker, it is usually preferable to sort versions in descending order (newest first) so that the most relevant versions are at the top of the list. Consider if the implementation in sdk_manager.ts should be updated to sort descending, and then update this test expectation accordingly.
df700d3 to
5835dd5
Compare
… no paths configured, and update test names
See #6025