mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
Improve --reporter flag help and error messages (#22900)
## Summary - Clarifies help text for `--reporter` and `--reporter-outfile` flags - Improves error messages when invalid reporter formats are specified - Makes distinction between test reporters and coverage reporters clearer ## Changes 1. Updated help text in `Arguments.zig` to better explain: - What formats are currently available (only 'junit' for --reporter) - Default behavior (console output for tests) - Requirements (--reporter-outfile needed with --reporter=junit) 2. Improved error messages to list available options when invalid formats are used 3. Updated CLI completions to match the new help text ## Test plan - [x] Built and tested with `bun bd` - [x] Verified help text displays correctly: `./build/debug/bun-debug test --help` - [x] Tested error message for invalid reporter: `./build/debug/bun-debug test --reporter=json` - [x] Tested error message for missing outfile: `./build/debug/bun-debug test --reporter=junit` - [x] Tested error message for invalid coverage reporter: `./build/debug/bun-debug test --coverage-reporter=invalid` - [x] Verified junit reporter still works: `./build/debug/bun-debug test --reporter=junit --reporter-outfile=/tmp/junit.xml` - [x] Verified lcov coverage reporter still works: `./build/debug/bun-debug test --coverage --coverage-reporter=lcov` 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude Bot <claude-bot@bun.sh> Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -122,7 +122,7 @@
|
||||
},
|
||||
{
|
||||
"name": "reporter",
|
||||
"description": "Specify the test reporter. Currently --reporter=junit is the only supported format.",
|
||||
"description": "Test output reporter format. Available: 'junit' (requires --reporter-outfile). Default: console output.",
|
||||
"hasValue": true,
|
||||
"valueType": "val",
|
||||
"required": false,
|
||||
@@ -130,7 +130,7 @@
|
||||
},
|
||||
{
|
||||
"name": "reporter-outfile",
|
||||
"description": "The output file used for the format from --reporter.",
|
||||
"description": "Output file path for the reporter format (required with --reporter).",
|
||||
"hasValue": true,
|
||||
"valueType": "val",
|
||||
"required": false,
|
||||
|
||||
Reference in New Issue
Block a user