question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

feat: pass command line arguments for `start` command

See original GitHub issue

Following 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 for run. @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:closed
  • Created 10 years ago
  • Comments:16 (8 by maintainers)

github_iconTop GitHub Comments

14reactions
danielsiwieccommented, Apr 2, 2016

@gaelazzo @timbertson A bit late to the party, but since this there’s a much simpler solution now:

karma start --grep integration

karma.conf.js:

module.exports = function (config) {
  config.set({
    ...,
    client: {
      args: ['--grep', config.grep]
    }
  })
}
7reactions
vojtajinacommented, Aug 3, 2013

Put it to the config file, exactly as you do with any other config variable.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found