Skip to content

🧪 Add tests for get_name in utilities.rs#29

Merged
bashandbone merged 3 commits intomainfrom
test/get-name-utilities-1293258776362724892
Mar 14, 2026
Merged

🧪 Add tests for get_name in utilities.rs#29
bashandbone merged 3 commits intomainfrom
test/get-name-utilities-1293258776362724892

Conversation

@bashandbone
Copy link
Owner

🎯 What: The testing gap for get_name in src/utilities.rs was addressed.
📊 Coverage: Test scenarios cover valid name provided (with and without extra spaces), empty/whitespace name with a valid url fallback, empty/whitespace name with a valid path fallback, no name with a valid path, no name/path with a valid url, empty/whitespace name with no fallbacks, and all None values.
Result: Test coverage improved for the get_name utility function, ensuring reliability for submodule and repo name parsing across different sources.


PR created automatically by Jules for task 1293258776362724892 started by @bashandbone

The `get_name` function was missing tests. This commit adds a test module
to `src/utilities.rs` covering all key scenarios for `get_name`: valid names,
fallback to url, fallback to path, error on no fallbacks, and error on all none.

Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com>
@google-labs-jules
Copy link
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Copilot AI review requested due to automatic review settings March 14, 2026 01:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds unit tests for get_name in src/utilities.rs, improving confidence in repository/submodule name derivation from explicit names, URLs, and paths.

Changes:

  • Added a #[cfg(test)] test module covering get_name success and error cases.
  • Added test cases for trimming, URL fallback, path fallback, and missing-input errors.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

bashandbone and others added 2 commits March 13, 2026 22:45
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@bashandbone bashandbone merged commit 1dbec71 into main Mar 14, 2026
6 of 7 checks passed
@bashandbone bashandbone deleted the test/get-name-utilities-1293258776362724892 branch March 14, 2026 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants