Skip to content

Add tests for SdkManager - #6040

Merged
DanTup merged 2 commits into
masterfrom
sdk-manager-tests
Apr 22, 2026
Merged

DanTup merged 2 commits into
masterfrom
sdk-manager-tests

Conversation

@DanTup

@DanTup DanTup commented Apr 22, 2026

Copy link
Copy Markdown
Member

See #6025

@DanTup DanTup added this to the v3.134.0 milestone Apr 22, 2026
@DanTup DanTup added the is testing Relates to the testing (either manual or automated) of Dart Code label Apr 22, 2026

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

@codecov

codecov Bot commented Apr 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.93%. Comparing base (fa5e3da) to head (df700d3).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/test/dart/sdk/sdk_manager.test.ts Outdated
Comment thread src/test/dart/sdk/sdk_manager.test.ts
Comment on lines +128 to +133
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",
]);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@DanTup
DanTup merged commit 6634d52 into master Apr 22, 2026
22 checks passed
@DanTup
DanTup deleted the sdk-manager-tests branch April 22, 2026 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

is testing Relates to the testing (either manual or automated) of Dart Code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants