-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(cli): restore command line help contents #3502
Conversation
These were lost after migration to yargs as CLI parser. Fixes karma-runner#3474
Below are diffs against output of Karma 4.4.1. Most notable difference is that yargs now wraps output at 80 characters. It is configurable, but I think we should stay wit the default as a good practice.
Karma - Spectacular Test Runner for JavaScript.
+Run --help with particular command to see its description and available options.
+
Usage:
karma <command>
Commands:
- start [<configFile>] [<options>] Start the server / do single run.
- init [<configFile>] Initialize a config file.
- run [<options>] [ -- <clientArgs>] Trigger a test run.
- completion Shell completion for karma.
-
-Run --help with particular command to see its description and available options.
+ karma init Initialize a config file.
+ karma start Start the server / do a single run.
+ karma run Trigger a test run.
+ karma stop Stop the server.
+ karma completion Shell completion for karma.
Options:
- --help Print usage and options.
- --version Print current version.
-
+ --help Print usage and options. [boolean]
+ --version Print current version. [boolean]
Karma - Spectacular Test Runner for JavaScript.
INIT - Initialize a config file.
Usage:
- karma init [<configFile>]
+ karma init [configFile]
Options:
+ --help Print usage and options. [boolean]
--log-level <disable | error | warn | info | debug> Level of logging.
--colors Use colors when reporting and printing logs.
--no-colors Do not use colors when reporting or printing logs.
- --help Print usage and options.
-
Karma - Spectacular Test Runner for JavaScript.
START - Start the server / do a single run.
Usage:
- karma start [<configFile>] [<options>]
+ karma start [configFile]
Options:
+ --help Print usage and options. [boolean]
--port <integer> Port where the server is running.
--auto-watch Auto watch source files and run on change.
--detached Detach the server.
--no-auto-watch Do not watch source files.
- --log-level <disable | error | warn | info | debug> Level of logging.
+ --log-level <disable | error | warn | info | debug> Level
+ of logging.
--colors Use colors when reporting and printing logs.
- --no-colors Do not use colors when reporting or printing logs.
- --reporters List of reporters (available: dots, progress, junit, growl, coverage).
- --browsers List of browsers to start (eg. --browsers Chrome,ChromeCanary,Firefox).
- --capture-timeout <integer> Kill browser if does not capture in given time [ms].
+ --no-colors Do not use colors when reporting or printing
+ logs.
+ --reporters List of reporters (available: dots, progress,
+ junit, growl, coverage).
+ --browsers List of browsers to start (eg. --browsers
+ Chrome,ChromeCanary,Firefox).
+ --capture-timeout <integer> Kill browser if does not capture in
+ given time [ms].
--single-run Run the test when browsers captured and exit.
--no-single-run Disable single-run.
- --report-slower-than <integer> Report tests that are slower than given time [ms].
+ --report-slower-than <integer> Report tests that are slower than
+ given time [ms].
--fail-on-empty-test-suite Fail on empty test suite.
--no-fail-on-empty-test-suite Do not fail on empty test suite.
--fail-on-failing-test-suite Fail on failing test suite.
--no-fail-on-failing-test-suite Do not fail on failing test suite.
- --help Print usage and options.
-
Karma - Spectacular Test Runner for JavaScript.
RUN - Run the tests (requires running server).
Usage:
- karma run [<configFile>] [<options>] [ -- <clientArgs>]
+ karma run [configFile] [-- <clientArgs>]
Options:
+ --help Print usage and options. [boolean]
--port <integer> Port where the server is listening.
--no-refresh Do not re-glob all the patterns.
--fail-on-empty-test-suite Fail on empty test suite.
--no-fail-on-empty-test-suite Do not fail on empty test suite.
- --help Print usage.
- --log-level <disable | error | warn | info | debug> Level of logging.
+ --log-level <disable | error | warn | info | debug> Level
+ of logging.
--colors Use colors when reporting and printing logs.
- --no-colors Do not use colors when reporting or printing logs.
-
+ --no-colors Do not use colors when reporting or printing
+ logs.
Karma - Spectacular Test Runner for JavaScript.
STOP - Stop the server (requires running server).
Usage:
- karma run [<configFile>] [<options>]
+ karma stop [configFile]
Options:
+ --help Print usage and options. [boolean]
--port <integer> Port where the server is listening.
--log-level <disable | error | warn | info | debug> Level of logging.
- --help Print usage.
-
Karma - Spectacular Test Runner for JavaScript.
COMPLETION - Bash/ZSH completion for karma.
Installation:
karma completion >> ~/.bashrc
-
Options:
- --help Print usage.
-
+ --help Print usage and options. [boolean]
- Karma version: 4.4.1
+ 5.0.4 |
✅ Build karma 258 completed (commit a60214e794 by @devoto13) |
✅ Build karma 259 completed (commit a60214e794 by @devoto13) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the test! Answered my question: "how did this happen" ;-)
🎉 This PR is included in version 5.0.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
These were lost after migration to yargs as CLI parser. Fixes karma-runner#3474
## [5.0.5](karma-runner/karma@v5.0.4...v5.0.5) (2020-05-07) ### Bug Fixes * **cli:** restore command line help contents ([karma-runner#3502](karma-runner#3502)) ([e99da31](karma-runner@e99da31)), closes [karma-runner#3474](karma-runner#3474)
These were lost after migration to
yargs
as CLI parser.The only issue I've noticed is that
yargs
reports all unknown arguments in the error about unknown command, but I guess we can live with it for now:Fixes #3474