Skip to content

🧪 test: improve coverage for name_from_url#26

Merged
bashandbone merged 2 commits intomainfrom
test-name-from-url-13151937733264336289
Mar 14, 2026
Merged

🧪 test: improve coverage for name_from_url#26
bashandbone merged 2 commits intomainfrom
test-name-from-url-13151937733264336289

Conversation

@bashandbone
Copy link
Owner

🎯 What: The missing error path and general happy path tests for name_from_url in src/utilities.rs were addressed.
📊 Coverage: The scenarios now tested include an empty URL (error path), typical valid URLs with or without trailing slashes, and with .git extensions.
Result: Test coverage improved, preventing future regressions to this pure string manipulation function.


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

Adds a `#[cfg(test)] mod tests` block to `src/utilities.rs` covering both the missing error path (empty URL input) and several happy paths for `name_from_url`, including trailing slashes and `.git` suffixes.

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 00:58
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

This PR adds unit tests for the name_from_url function in src/utilities.rs, covering both happy paths (standard HTTPS URLs, URLs with .git suffix, trailing slashes, SSH-style URLs) and the error path (empty URL input).

Changes:

  • Added a #[cfg(test)] module with a single test function test_name_from_url exercising five scenarios of the name_from_url utility.

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

Adds a `#[cfg(test)] mod tests` block to `src/utilities.rs` covering both the missing error path (empty URL input) and several happy paths for `name_from_url`, including trailing slashes and `.git` suffixes.

Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com>
@bashandbone bashandbone merged commit a0714a8 into main Mar 14, 2026
6 of 7 checks passed
@bashandbone bashandbone deleted the test-name-from-url-13151937733264336289 branch March 14, 2026 05:15
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