Skip to content

Conversation

@muzimuzhi
Copy link
Contributor

Fixes the shebangs in two JavaScript examples added by #377, and add usage tests for them.

Note that no --help tests were added, due to

Copilot AI review requested due to automatic review settings December 23, 2025 19:42
@codecov
Copy link

codecov bot commented Dec 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 57.40%. Comparing base (6fd62b4) to head (967b94e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #406      +/-   ##
==========================================
+ Coverage   57.22%   57.40%   +0.18%     
==========================================
  Files          47       47              
  Lines        5543     5543              
  Branches     5543     5543              
==========================================
+ Hits         3172     3182      +10     
+ Misses       1337     1308      -29     
- Partials     1034     1053      +19     

☔ 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.

Copy link

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 fixes the shebangs in two JavaScript example files and adds corresponding test coverage for non-shell script usage parsing. The changes correct the shebang from #!/usr/bin/env -S usage node to #!/usr/bin/env -S usage exec node to properly use the usage exec subcommand, and add execution tests to verify both the new bracketed syntax (// [USAGE]) and old syntax (//USAGE) work correctly with JavaScript files.

Key Changes

  • Fixed shebangs in JavaScript examples to use usage exec node instead of usage node
  • Updated comments in example files to clarify they are "non-shell script" tests
  • Added two new test functions to verify JavaScript example execution

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
examples/test-usage-double-slash.js Fixed shebang to use usage exec node and updated comment to specify "non-shell script"
examples/test-usage-double-slash-old.js Fixed shebang to use usage exec node and updated comment to specify "non-shell script"
cli/tests/examples.rs Added two execution tests for the JavaScript examples, verifying both new bracketed and old USAGE syntax

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

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.

1 participant