Skip to content
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

Karma CLI arguments support #124

Open
jcsmorais opened this issue Sep 16, 2014 · 3 comments
Open

Karma CLI arguments support #124

jcsmorais opened this issue Sep 16, 2014 · 3 comments

Comments

@jcsmorais
Copy link

Hi,

I'm currently running karma 0.12.16 and grunt-karma 0.9.0.

On Karma's configuration each setting has a --arg flag that allows one to use it while running karma through command line interfaces. I've been using grunt-karma for a while and noticed that these arguments don't seem to work while using it.

After further investigation, I noticed the following:

Based on this it seems we are supporting --arg=value instead of the format Karma supports by default which is --arg value - any reason why? Either way, specifying something like --browsers=Chrome,Firefox doesn't seem to work - the browsers specified on Gruntfile.js keep being used instead.

Plus, here we're defining data based on opts and this.data giving precedence to the latter, bellow we're basically defining data.browsers based on this.data.browsers, maybe I'm missing something, but isn't this the same? The value of this.data.browsers is already stored in data.browsers due to the first statement, no?

I would really like to see more support on CLI arguments, specially with compliance with what Karma has by default - I'm also willing to spend some time working on this, so any feedback is appreciated.

@Jeff-Symphony
Copy link

This is a significantly limiting feature of this module.

So, I looked into it a bit as well. It seems that the --arg=value gets passed to the karma server as a config.client arg, which only gets passed to the browser that's running. To summarize, these parameters don't change the karma configs.

What's needed is a way to pass karma config options in addition to this current usage of client.args. I'd probably incorporate a module for arg parsing (like node-optimist).

@Jeff-Symphony
Copy link

It looks like this is a common (OPEN) issue: #91, #96

@ahmehri
Copy link

ahmehri commented Nov 9, 2016

@jcsmorais @Jeff-Symphony what's the status of this PR?

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

No branches or pull requests

3 participants