feat: pass command line arguments for `start` command
See original GitHub issueFollowing on from #530
We now have:
$ karma start &
$ karma run -- --grep someTest
But that sucks for batch runs (like CI scripts), because you need to:
- run
karma start
- parse its output (!) to see when it’s ready
- run
karma run -- <args>
- kill the first process
- deal with other messy stuff related to managing multiple processes
There is real need for this feature, e.g segmenting travis builds by test type:
karma start --single-run -- --tag unit
karma start --single-run -- --tag integration
Options:
- treat everything after
--
as clientArgs, just like we do forrun
. @vojtajina doesn’t like this, because it removes the possibility of using this for something else in the future. - an explicit
--client-args
would trigger that ALL following arguments should be taken as clientArgs:karma start --single-run --client-args --grep unit
This should probably grab only up to the next “–” argument though. - more tediously, specifying them individually:
karma start --single-run --client-arg=--grep --client-arg=unit
Other suggestions?
Issue Analytics
- State:
- Created 10 years ago
- Comments:16 (8 by maintainers)
Top Results From Across the Web
Windows Terminal command line arguments | Microsoft Learn
To display a help message listing the available command line arguments, enter: wt -h , wt --help , wt -? , or wt...
Read more >How to start a program with command line arguments on ...
start /b "" "c:\Program Files\Oracle\VirtualBox\VBoxHeadless.exe" -startvm "debian604 64". If you read the parameter list with start /? :
Read more >4.11 Accessing Command-Line Arguments | 22 Python Tricks
You can let the user specify command-line arguments; these are optional arguments that give information directly to the program on start-up.
Read more >How can I pass command line arguments to a program in a ...
If you go to a dos prompt in windows (click your start button and in the "Search programs and files" type cmd and...
Read more >Understanding Command Line Arguments and How to Use ...
In order to understand what a command line argument is, we should show an example of how a program is normally launched. In...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@gaelazzo @timbertson A bit late to the party, but since this there’s a much simpler solution now:
karma.conf.js:
Put it to the config file, exactly as you do with any other config variable.